Re:How Mailinator compresses its email stream by 90%
by pbiggar on Tuesday February 21, 2012 @03:00PM
(#3617841)
In an aside he mentions you should use bubblesort instead of quicksort for small arrays, due to cache locality, etc. I'd recommend using insertion sort instead of bubblesort - it does much better in both cache locality and branch performance (one branch prediction miss per key).
[ Parent
| on HN ]
Re:How Mailinator compresses its email stream by 90%
by cobrausn on Tuesday February 21, 2012 @05:32PM
(#3618322)
That seems a strange assertion - I was under the impression that insertion sort beats bubble sort on small arrays, pretty much always, and even in 'nearly sorted' arrays, which is often touted as a strength of bubble sort.
http://www.sorting-algorithms.com/ gives a decent overview with n equal to 20, 30, 40, or 50, but nothing smaller. Now I'm curious.