Lightning Talk: Use SIMD Pairwise Reduction in C++!
summary
Experiments adding 10 billion doubles show scalar sequential accumulation runs at about 12% efficiency and produces wildly different sums when inputs are permuted. A Kahan-like rolling error reduces bias, but the robust fix is SIMD pairwise reduction: recursive pairwise summation implemented with SIMD yields correct, repeatable results and runs ~3.5 billion ops/sec versus ~800k ops/sec for the scalar baseline, so it both fixes accuracy and dramatically increases throughput.
AI-written summary · about
chapters (4)
- 0:00The summation inconsistency
- 1:13Floating point error analysis
- 2:22Sequential summation risks
- 4:03Pairwise summation solution
related talks
05mC++ Sequential Considered Harmful
04mLightning Talk: How to Leverage SIMD Intrinsics for Massive Slowdowns
01h 03mCompute More in Less Time Using C++ Simd Wrapper Libraries
57mAdventures in SIMD-Thinking (part 1 of 2)
01h 35mThe Twin Algorithms
01h 01mAdventures in SIMD-Thinking (part 2 of 2)
06mLightning Talk: Safe Arithmetic Speed-Run: Experimental C++ Library
01h 06m“Improving Performance Through Compiler Switches..."
