Skip to content
Google Open Source Blog·

🚀New Open-Source Sorter Achieves 10x Speedup Over C++ std::sort

A new sorting algorithm outperforms C++ by 10x

TL;DR

A new open-source sorter achieves a 10x speedup over C++ std::sort, thanks to portable SIMD functions. It's a game-changer for anyone dealing with large datasets. Available on GitHub.

A new open-source sorter has been released, achieving a 10x speedup over the standard C++ std::sort. This breakthrough is due to portable SIMD functions that work across all modern CPU architectures. Developers working with large datasets will see significant performance improvements. The sorter reaches speeds of 798 MB/s on AVX2, 1123 MB/s on AVX-512, and 499 MB/s on Apple M1, making it a must-have for high-performance computing tasks.

New Open-Source Sorter Achieves 10x Speedup Over C++ std::sort — Google Open Source Blog

Key Points

1

New sorter achieves 10x speedup over C++ std::sort, reaching 798 MB/s on AVX2.

2

Sorter supports a full range of 16-128 bit inputs, making it versatile for various data types.

3

On Apple M1, the sorter can sort 1 million 32/64/128-bit numbers at 499/471/466 MB/s.

4

AVX-512 is 1.4-1.6 times faster than AVX2, with speeds up to 1123 MB/s.

5

The code is Apache2-licensed and available on GitHub, with a detailed paper explaining the implementation.

Why It Matters

If you're working with large datasets in C++, this new sorter is a must-have. It offers a 10x speedup over std::sort, reaching 798 MB/s on AVX2 and 1123 MB/s on AVX-512. For teams processing millions of numbers daily, this could cut processing times dramatically. The implementation is portable across all modern CPU architectures, making it easy to integrate into existing workflows.

open-sourcesortingsimdperformancec++

Comments

Subscribe to join the conversation...

Be the first to comment

Enjoyed this article?

Get it daily. 7am. Free. Reads in 5 minutes.

Join 3,482 builders reading daily.

Also get