↓ Skip to main content

“Today we’re sharing open source code that can sort arrays of numbers about ten times as fast as the C++ std::sort, and outperforms state of the art architecture-specific algorithms, while being portable across all modern CPU architectures.”

Jan Wassenbergopensource.googleblog.com ↗

The standard library sorts at 58 to 128 MB/s on the test CPU. This hits over 1 GB/s on one core with AVX-512. Sorting is one of the most studied problems in computing, and the default implementation still leaves a 9x to 19x gap. The vector units were sitting in the CPU the whole time. The standard library just never used them.