~/talk

Comparison of C++ Performance Optimization Techniques for C++ Programmers

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [software-architecture]
slides:none on file

Benchmarks show a custom C++ library (SU/SWAR style) implementing strlen and atoi variants that beats GLIBC consistently, using AVX2/NEON intrinsics and portable SIMD fallbacks. The atoi path is over 3x faster for A2I on tested hardware. Key details: aligned block loads to avoid page-cross faults, lane-wise parallel comparisons to find the first NUL, arithmetic-based digit packing and multiply-add conversion, and minimal branching so object code stays small and the processor’s out-of-order engine does the rest.

AI-written summary · about

  1. 0:00Introduction and objective
  2. 2:42Motivation and benchmarks
  3. 7:43Benchmark methodology
  4. 10:26Analyzing natural strlen
  5. 16:04Advanced implementation techniques
  6. 24:52Lessons in library design
  7. 28:08GLIBC codebase critique
  8. 34:27Compiler explorer analysis
  9. 38:22Parsing and integer conversion
  10. 50:16Performance results and patterns
  11. 55:27Foundational performance principles
~/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.