Uploaded November 2026 | Updated November 2026, 13 hours ago
https://cppcon.org
---
Same Bits Without Losing MIPS: Reproducible Numerics at Full Hardware Speed - Andrew Drakeford
---
Floating point has a reputation for betrayal. Change the thread count, vector width, compiler flags, reduction tree, or target architecture, and the low bits can move. Parallel algorithms make this worse: the standard often specifies the operation, but not the numerical expression whose result must be reproduced. This talk asks a provocative question: what if reproducible numerics did not have to be slow?
We will show reproducible, deterministic implementations of reduce and scan that exhibit better error behavior on hostile floating-point workloads and can match or beat conventional standard-library implementations on realistic workloads. The trick is not to freeze the execution schedule. It is to specify the expression being computed, then let the implementation use SIMD, threading, blocking, tiling, and platform-specific strategies to compute that expression efficiently.
The key idea, developed through C++ standardization work such as P4016R0 and P4229R0, is reproducibility by reproducing the computation. Instead of asking the implementation to promise a particular schedule, we give the calculation a named expression. Once that expression is chosen, changing the thread count, vector width, chunking, or blocking strategy does not silently change the answer.
A reproducible scan makes this harder than reduce because it does not expose only one final value. It exposes every prefix. A reproducible final sum is not enough if the intermediate results still drift. We will show how expression and observation contracts make those prefixes reproducible without forcing the computation back into a slow sequential order.
Then we go below the algorithm layer, to the places where bits usually escape: FMA contraction, denormals, floating-point environment choices, math-library approximations, and vectorized transcendental functions. The goal is not to get the same answer by turning off the hardware. We will show reproducible vectorized primitives, including transcendental functions, running at speeds comparable to established vector math libraries while preserving a cross-platform numerical contract.
Finally, we put the whole stack under stress: a heterogeneous numerical pipeline across x86-64, Apple Silicon, and CUDA. The data is deliberately hostile, with high cancellation rates and fragile intermediate states. The aim is not to pass friendly benchmark cases, but to reproduce the specified computation, including the same intermediate failures, not just the same final answer, bit for bit, across CPUs, GPUs, and toolchains.
---
Slides: github.com/CppCon/CppCon2026/blob/main/Presentations
Work at Hudson River Trading (HRT): tinyurl.com/safxfctf
---
Andrew Drakeford
Andrew Drakeford has a PhD in Physics and began developing C++ applications in the early 1990s at British Telecom Laboratories. For the past two decades, he has worked in finance, building high-performance calculation libraries and trading systems in C++.His current focus is making numerical computation both bitwise reproducible and fast across heterogeneous platforms - "slaying the ghosts in the machine". He is a member of the BSI C++ Panel. His interests include software architecture, SIMD, CUDA, HPC, low-latency computing, quantitative finance, machine learning, reinforcement learning, and systematic market-making strategies.
---
CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.
Annual CppCon Conference - cppcon.org
linkedin.com/company/cppcon
https://x.com/cppcon
facebook.com/CppConference
reddit.com/r/cppcon
https://mastodon.social/@CppCon
---
Videos Filmed & Edited by Bash Films: BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---
#cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #technews #programming #programmer
https://cppcon.org
---
Same Bits Without Losing MIPS: Reproducible Numerics at Full Hardware Speed - Andrew Drakeford
---
Floating point has a reputation for betrayal. Change the thread count, vector width, compiler flags, reduction tree, or target architecture, and the low bits can move. Parallel algorithms make this worse: the standard often specifies the operation, but not the numerical expression whose result must be reproduced. This talk asks a provocative question: what if reproducible numerics did not have to be slow?
We will show reproducible, deterministic implementations of reduce and scan that exhibit better error behavior on hostile floating-point workloads and can match or beat conventional standard-library implementations on realistic workloads. The trick is not to freeze the execution schedule. It is to specify the expression being computed, then let the implementation use SIMD, threading, blocking, tiling, and platform-specific strategies to compute that expression efficiently.
The key idea, developed through C++ standardization work such as P4016R0 and P4229R0, is reproducibility by reproducing the computation. Instead of asking the implementation to promise a particular schedule, we give the calculation a named expression. Once that expression is chosen, changing the thread count, vector width, chunking, or blocking strategy does not silently change the answer.
A reproducible scan makes this harder than reduce because it does not expose only one final value. It exposes every prefix. A reproducible final sum is not enough if the intermediate results still drift. We will show how expression and observation contracts make those prefixes reproducible without forcing the computation back into a slow sequential order.
Then we go below the algorithm layer, to the places where bits usually escape: FMA contraction, denormals, floating-point environment choices, math-library approximations, and vectorized transcendental functions. The goal is not to get the same answer by turning off the hardware. We will show reproducible vectorized primitives, including transcendental functions, running at speeds comparable to established vector math libraries while preserving a cross-platform numerical contract.
Finally, we put the whole stack under stress: a heterogeneous numerical pipeline across x86-64, Apple Silicon, and CUDA. The data is deliberately hostile, with high cancellation rates and fragile intermediate states. The aim is not to pass friendly benchmark cases, but to reproduce the specified computation, including the same intermediate failures, not just the same final answer, bit for bit, across CPUs, GPUs, and toolchains.
---
Slides: github.com/CppCon/CppCon2026/blob/main/Presentations
Work at Hudson River Trading (HRT): tinyurl.com/safxfctf
---
Andrew Drakeford
Andrew Drakeford has a PhD in Physics and began developing C++ applications in the early 1990s at British Telecom Laboratories. For the past two decades, he has worked in finance, building high-performance calculation libraries and trading systems in C++.His current focus is making numerical computation both bitwise reproducible and fast across heterogeneous platforms - "slaying the ghosts in the machine". He is a member of the BSI C++ Panel. His interests include software architecture, SIMD, CUDA, HPC, low-latency computing, quantitative finance, machine learning, reinforcement learning, and systematic market-making strategies.
---
CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.
Annual CppCon Conference - cppcon.org
linkedin.com/company/cppcon
https://x.com/cppcon
facebook.com/CppConference
reddit.com/r/cppcon
https://mastodon.social/@CppCon
---
Videos Filmed & Edited by Bash Films: BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---
#cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #technews #programming #programmer
![Fix C++ Stack Corruptions with the Shadow Stack Library - Bartosz Moczulski - CppCon 2025
https://cppcon.org
Fix C++ Stack Corruptions with the Shadow Stack Library - Bartosz Moczulski - CppCon 2025
Fatal stack micro-corruptions, mysterious segmentation faults, and bus errors tamed live on stage, come and see!
Operating systems, compilers, libraries, and C++ language itself provide multiple tools and abstractions to protect against memory corruptions, both for heap and stack. Standard containers like std::array or std::vector can check rages when accessing members (except the [] operator, by design). GNU C Library (glibc) features MALLOC CHECK . Compilers come with address sanitizers and stack protectors onboard. Linux has mprotect(). Lastly, Valgrind can detect hard-to-imagine misbehaviors, although often at a cost that is impossible or impractical to accept. And would you believe that all these countermeasures are sometimes just not enough?! There are treacherous scenarios that can sneak through all of these defense lines and frame perfectly innocent functions like pthread mutex unlock() into a nasty segmentation fault. To understand why and how it can happen we will take a deep dive into the fascinating world of calling convention and even disassemble one or two functions to inspect the machine code generated by the compiler. Finally, I will present Shadow Stack - a novel technique and a C/C++ library that can help identify and fix the true source of tricky stack corruptions by recursively narrowing the search scope of the function call graph.
Slides: https://github.com/CppCon/CppCon2025/blob/main/Presentations/Shadow_Stack.pdf
Work at Hudson River Trading (HRT): https://tinyurl.com/safxfctf
Bartosz Moczulski
Bartosz Moczulski /pronounce: bar-tosh mo-chool-skee/ is a software engineer and consultant with 20 years of commercial experience in the digital TV industry and a proud holder of MSc degree in Computer Science from Wroclaw University of Technology (Poland). Bartosz is a big fan of the GNU/Linux ecosystem and open-source in general. He likes to call himself a Linux detective and rarely leaves a bug investigation unsolved. Bartosz has years of experience in C (GStreamer), C++ (WebKit), Linux security, and software integration in embedded systems (Yocto/OpenEmbedded, Buildroot), seeking an opportunity to pick some Rust soon. He is never afraid to descend to the assembler level or to spawn Ghidra or Radare2 when the situation demands it. All this time he is not losing sight of the bigger picture and can engage in projects at the architectural level. Bartosz is also passionate about knowledge sharing and ran numerous well-received internal trainings and workshops in the companies he used to work for. In his spare time, he likes to make wine and maintain his home lab, running a number of self-hosted services; both of these activities for the benefit of his friends and family. His current passion is medieval calligraphy which, being a left-hander, he has to write upside-down. He prefers a quill over a broad-edge nib and his favorite letters are ſ (long s) and þ (thorn).
CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.
Annual CppCon Conference - https://www.cppcon.org
https://www.linkedin.com/company/cppcon
https://x.com/cppcon
https://www.facebook.com/CppConference
https://www.reddit.com/r/cppcon/
https://mastodon.social/@CppCon
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: https://events.digital-medium.co.uk
#cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #technews #programming #programmer Fix C++ Stack Corruptions with the Shadow Stack Library - Bartosz Moczulski - CppCon 2025](https://i.ytimg.com/vi/-Qg0GaONwPE/mqdefault.jpg)









