10 comments

[ 774 ms ] story [ 2420 ms ] thread
I spent the last couple months working on this writeup, looking forward to feedback and questions. Hope you find this insightful.
Thank you for such detailed analysis! Just curious to know which version of x86-simd-sort did you benchmark: release v1.0 or the top of main current branch? (I'm the author of x86-simd-sort).
Hi, hope you found this analysis helpful. I vendored the code Feb 16 2023 from the main branch.
Still using the simple way of getting the pivot though.
No matter how sophisticated the pivot selection is, you can always risk having some degenerate worst case. I recommend having something like a heapsort fallback after a certain recursion limit is reached, as do pdqsort, ipnsort and vqsort(I'm a little fuzzy what their fallback is, but they have one).
Yes, vqsort does indeed resort to Heapsort after too many recursions. I'd be surprised if that happens on real data, though, because we apply a lot more effort to the pivot selection. Would be curious to see any input distribution that triggers a fallback.
Nice.

Effect of frequency downclocking when AVX-512 instructions get used?

https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Dow...