Skip to content

Comment on Sorting Algorithm Cheat Sheetparent

Comments

One of the big factors behind this is that the cost of pipeline stalls in a theoretically good algorithm can significantly exceed the cost of extra comparisons.

Whether that is true depends on a combination of how much data you have, what kind of data you have, and your programming language's low-level representation.

For ints in C++ and a list of 20 elements, it will be reliably true. For strings in Perl with a list of 500 elements, it reliably won't be true.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.