11 ms·
My single-threaded floating point sort is also twice as fast as djbsort: http://stereopsis.com/radix.html http://stereopsis.com/radix.html This one uses 11-bi
by herf 8y ago
My single-threaded floating point sort is also twice as fast as djbsort:
http://stereopsis.com/radix.html http://stereopsis.com/radix.html
This one uses 11-bit radix to save memory bandwidth. Without all the floating-point stuff it would be faster.
- AstralStorm 8y agoThe point of djbsort is to be constant time while not being super slow. Of course a fast directly implemented radix sort will be faster, especially if you sprinkle SIMD on top.
- herf 8y agoActually, there is only an advantage to radix after 100,000 elements - djb is much faster for small arrays. Also, while radix is cpu constant time, you'd need to do some kind of secure shuffle in advance to make it truly constant-time (considering memory locality timing).