rchillyard / The-repository-formerly-known-as

2 stars 12 forks source link

26 ComplexObject first commit #43

Closed rchillyard closed 3 years ago

rchillyard commented 4 years ago

Added GenericHuskySort class which extends IntroHuskySort; HuskySortBenchmark: Added benchmarks of GenericHuskySort using Tuple (inner) class;

Currently, the generic sort is slower than Timsort. Need to understand why that is before we merge this PR.

rchillyard commented 4 years ago

According to my profiling, in the HuskySort version, it hits 1798 during the primary sort, 368 for the presort (coding), and 324 for the post-sort (using Timsort) for a total of 2491. Straight Timsort uses 2141 total samples. Coding seems relatively slow. But it spends far too long doing the second pass sort which suggests that the coding isn't very good. I will add some unit tests to ensure that coding and comparison are consistent.

rchillyard commented 4 years ago

After Fix huskyCoder for Tuple class commit, the timings are the same.

rchillyard commented 4 years ago

Problems with the husky sort timings fixed (was using the generic husky sort, instead of the pure husky sort). Would appreciate somebody doing some comparison benchmarks with the master branch.