~/talk

A Long Journey of Changing std::sort Implementation at Scale

Talkat CppCon 2023 · on Monday, 2023-10-02· at 14:00· Adams, 6700 North Gaylord Rockies Boulevard· [rust]
links:none on file
slides:none on file

Google replaces std::sort replacement in LLVM libc++ and measures hundreds of thousands of calls, then ships a new mix of block quicksort and ninther pivoting; performance improves up to ~50% on random ints and ~10% on strings and shows ~78% production speedup. Engineering work adds strict weak ordering checks, ASAN and debug-only sampling of the first ~100 elements plus randomized golden-tests to expose flaky expectations, fixes thousands of comparator bugs, prevents out‑of‑bounds reads, and takes months of incremental fixes and rollouts.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Sorting in C++ history
  3. 3:55Quick sort limitations
  4. 8:12LLVM libc++ at Google
  5. 10:20Good sorting algorithm
  6. 14:13Production failures testing
  7. 16:24Randomization for testing
  8. 21:50Stable sort determinism
  9. 25:29Weak ordering validation
  10. 33:59Debugging comparators
  11. 36:09Comparator bugs
  12. 41:30Floating-point pitfalls
  13. 44:01Comparator exploits
  14. 47:11Block quicksort PDQ
  15. 50:04Default sort instability
  16. 51:55Comparator sanitizer gains
  17. 52:57Improve your sorting
  18. 54:24Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.