News for hackers. Stuff that matters.
Re:10x Faster sort than C++ std:sort by williamkuszmaul on Friday June 03, 2022 @03:20PM (#31612517)
Impressive!

There are already implementations of sample sorting that are much faster than c++ sort (but I don't recall how much faster). I'd be very interested in a comparison to some of those...

Also, since we are sorting integers, I'd also be interested to know how well a modern implementation of radix sort can be made.

Re:10x Faster sort than C++ std:sort by janwas on Saturday June 04, 2022 @01:37AM (#31617323)
:) Are you thinking of ips4o (sample sort)? That's about 2-3x std::sort. There's also a pending patch to std::sort that replaces it with BlockQuicksort which would narrow that gap.

We integrate vqsort into ips4o, calling it once subarrays fit in L2. That speeds up ips4o by 2.9x (single thread) and 1.6 (parallel - bandwidth limited). More details in the paper.

I previously also worked on radix sort: https://arxiv.org/abs/1008.2849 Interestingly, that 12 year old result on dual-socket/8 cores is only about twice as fast as a single AVX-512 core today.

Re:10x Faster sort than C++ std:sort by janwas on Sunday June 05, 2022 @01:35AM (#31628328)
Re:10x Faster sort than C++ std:sort by mc4ndr3 on Friday June 03, 2022 @11:19AM (#31609499)
100x faster: Don't sort.
Re:10x Faster sort than C++ std:sort by janwas on Friday June 03, 2022 @03:07PM (#31612379)
Fair :) Sorting is useful in DB joins/group-by, though.

(Author here, happy to discuss.)

Re:10x Faster sort than C++ std:sort by hypertele-Xii on Friday June 03, 2022 @06:50PM (#31614701)
At first glance seems like a snarky dismissal, but this is actually valid, actionable advice. If you can arrange your data flow in such a way that sorting is unnecessary, you've avoided an expensive optimization problem altogether.
Re:10x Faster sort than C++ std:sort by bradknowles on Saturday June 04, 2022 @05:04PM (#31625047)
No sorting is faster than no sorting.