News for hackers. Stuff that matters.
Re:Faster than radix sort: Kirkpatrick-Reisch sorting by MaxBarraclough on Tuesday June 09, 2020 @01:25PM (#23468673)
> Big O gets you in the right ballpark of what to look at

Generally I'd say that's true, but even that depends on context. For sorting very small arrays, on typical hardware, you can't beat bubble-sort and insertion-sort.

Re:Faster than radix sort: Kirkpatrick-Reisch sorting by elwes5 on Wednesday June 10, 2020 @08:55AM (#23476502)
Oh absolutely. The bubble sort sort thing usually comes down to the architecture of the machine. One of the things the O notation kind of hand waves away. On paper some things are faster. But put in 3 levels of cache, a CPU scheduler, a particular ASM instruction flow that makes things faster/slower and suddenly things are different. That is my biggest gripe with the notation. It is good to get you 'close'. But sometimes you just need to fiddle with it and try it. The 'C' bit can get you. On paper bubble sort is always worse. But it can run faster for small sets because the code and is small enough to fit into L1. Whereas maybe a mergesort implementation either the code or the data fits but not both.