# Google's portable Quicksort hits 1 GB/s, 19x faster than std::sort

Original title: We've created the first vectorized Quicksort

> Hacker News story 49731054 · language: en · submitted 2026-09-16
> Web version: https://zeli.app/story/49731054
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 171 · by [mococa](<https://news.ycombinator.com/user?id=mococa>) · 💬 29
[original](<https://opensource.googleblog.com/2022/06/Vectorized%20and%20performance%20portable%20Quicksort.html>) · [HN discussion](<https://news.ycombinator.com/item?id=49731054>)

## Summary

Google open-sourced a vectorized Quicksort that sorts 1 million numbers at up to 1.1 GB/s on a single Skylake core, 9–19x faster than C++ std::sort. Using Highway's portable SIMD, it runs on six instruction sets across three architectures—including AVX2, AVX-512, and Arm NEON—and outperforms architecture-specific implementations while supporting 16- to 128-bit inputs.

## Key quote

> Previously, sorting has been considered expensive. We are interested to see what new applications and capabilities will be unlocked by being able to sort at 1 GB/s on a single CPU core.

## HN discussion (29 comments)

### [zX41ZdbW](<https://news.ycombinator.com/item?id=49731691>)

> Strange to see it here, the article is quite old.
>
> Since pdqsort, vqsort, and glide sort, the current state-of-the-art are driftsort and ipnsort.
>
> I've integrated them into ClickHouse: https://github.com/ClickHouse/ClickHouse/pull/106650

### [bee_rider](<https://news.ycombinator.com/item?id=49731617>)

> Well, it came out a while ago, so maybe we can be a bit silly:
>
> There’s something sort of beautiful about mergesort and heapsort. Their names tell you what their main idea is, and how they work is immediately obvious.
>
> Quicksort, on the other hand, has nothing beautiful about it and is named after it’s one redeeming feature (that it is quick for a lot of cases).

### [minitech](<https://news.ycombinator.com/item?id=49731540>)

> Actual title: “Vectorized and performance-portable Quicksort” (2022).
>
> Actual sense in which it’s first:
>
> \> Happily, modern instruction sets (Arm SVE, RISC-V V, x86 AVX-512) include a special instruction suitable for partitioning. Given a separate input of yes/no values (whether an element is less than the pivot), this "compress-store" instruction stores to consecutive memory only the elements whose corresponding input is "yes". We can then logically negate the yes/no values and apply the instruction again to write the elements to the other partition. This strategy has been used in an AVX-512-specific Quicksort. But what about other instruction sets such as AVX2 that don't have compress-store? Previous work has shown how to emulate this instruction using permute instructions.
>
> \> We build on these techniques to achieve the first vectorized Quicksort that is portable to six instruction sets across three architectures, and in fact outperforms prior architecture-specific sorts.

---

## Cite

- Page: https://zeli.app/story/49731054
- Date: 2026-09-16
- Source: opensource.googleblog.com (https://opensource.googleblog.com/2022/06/Vectorized%20and%20performance%20portable%20Quicksort.html)
- Hacker News: https://news.ycombinator.com/item?id=49731054

## Other languages

- zh: https://zeli.app/zh/story/49731054 · markdown: https://zeli.app/zh/story/49731054.md
- ja: https://zeli.app/ja/story/49731054 · markdown: https://zeli.app/ja/story/49731054.md
- ko: https://zeli.app/ko/story/49731054 · markdown: https://zeli.app/ko/story/49731054.md
- de: https://zeli.app/de/story/49731054 · markdown: https://zeli.app/de/story/49731054.md
- es: https://zeli.app/es/story/49731054 · markdown: https://zeli.app/es/story/49731054.md
- ru: https://zeli.app/ru/story/49731054 · markdown: https://zeli.app/ru/story/49731054.md
