CppCon 2016: “From Numerical Cosmology to Efficient Bit Abstractions for the Standard Library"

http://CppCon.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2016 — Efficient bit abstractions for the standard library, or how to beat vector<bool> performances by three orders of magnitude. Can you imagine a perfect world? A world of unicorns. A world of double rainbows. A world of candy mountains. A world in which vector<bool> would not even have existed. As the first three aspects are easy to imagine, I will mostly focus on the last one. For about 20 years now, vector<bool> has been regarded as a bad design decision. There is no problem with the functionality provided by a dynamic vector of bits, but specializing vector for boolean data types was not the best idea ever. In this talk, I will present a radically new approach, generalizing existing implementation practices and experimentations, to achieve both genericity and performances for bit manipulation. I will describe how we designed a minimalist set of abstractions to access and manipulate bits and to serve as a common basis for bit oriented data structures, algorithms and arbitrary precision arithmetic. This presentation echoes a standardization work that will hopefully make bit utilities available in a future revision of the C++ standard library. Bit manipulation is used as a fundamental building block of a wide range of applications including arithmetic of big integers, cryptography, hash tables, compression, fast Fourier transforms and bioinformatics. We started this work while investigating... the expansion of the Universe. Cosmological simulations on supercomputers require fast data structures, and in our case bit manipulation was a bottleneck. A common problem with bit abstractions is that they need a double standard: an easy to use interface for users, and a full access to low level instructions and compiler intrinsics to make the most of modern architectures. I will review our approach and give examples on how to use our library. I will also explain how to use bit values, bit references, bit pointers and bit iterators to design algorithms that outperform bit vectors by factors varying between 100 an 3500. I will conclude this talk by discussing how the bit abstraction proposal may affect the future of the standard library and particularly how it will be interfaced with standard algorithms, standard containers, ranges and arbitrary precision arithmetic. — Vincent Reverdy University of Illinois at Urbana-Champaign Astrophysicist Urbana-Champaign, Illinois Area Vincent has been working as a post-doctoral researcher at the University of Illinois at Urbana-Champaign (USA) since he obtained his PhD at the Paris observatory (France) in november 2014. His main scientific interests are related to cosmology and general relativity. He his particularly interested in the study of relativistic effects at cosmological scales using high performance simulations run on supercomputers. Because these simulations rely on tree data structures, he started investigating ways to optimize them. He now leads a research team working on tree data structures with main applications in simulations, machine learning, and data science. He also participates into the C++ standardization process and regularly submits proposals to improve the C++ language. — Videos Filmed & Edited by Bash Films: http://www.BashFilms.com Work at Hudson River Trading (HRT): https://tinyurl.com/safxfctf

CppCon 2016: Casey Carter “Iterator Haiku"
▶︎

CppCon 2016: Casey Carter “Iterator Haiku"

CppCon 2019: Conor Hoekstra “Algorithm Intuition (part 1 of 2)”
▶︎

CppCon 2019: Conor Hoekstra “Algorithm Intuition (part 1 of 2)”

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025
▶︎

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones
▶︎

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

CppCon 2016: Grill The Committee Panel
▶︎

CppCon 2016: Grill The Committee Panel

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains
▶︎

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker
▶︎

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup
▶︎

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

When Nanoseconds Matter: Ultrafast Trading Systems in C++ - David Gross - CppCon 2024
▶︎

When Nanoseconds Matter: Ultrafast Trading Systems in C++ - David Gross - CppCon 2024

Keynote: After the AI Hype – What’s Real, and What’s Next - Richard Campbell - 2026
▶︎

Keynote: After the AI Hype – What’s Real, and What’s Next - Richard Campbell - 2026

Lambdas, Ranges and trivially_copyable: Why This Matters for Parallel Algorithms - Ruslan Arutyunyan
▶︎

Lambdas, Ranges and trivially_copyable: Why This Matters for Parallel Algorithms - Ruslan Arutyunyan

Instrumenting the Stack: Strategies for End-to-end Sanitizer Adoption - Damien Buhl - CppCon 2025
▶︎

Instrumenting the Stack: Strategies for End-to-end Sanitizer Adoption - Damien Buhl - CppCon 2025

Andrej Karpathy: From Vibe Coding to Agentic Engineering w/ Stephanie Zhan
▶︎

Andrej Karpathy: From Vibe Coding to Agentic Engineering w/ Stephanie Zhan

The Design of C++ , lecture by Bjarne Stroustrup
▶︎

The Design of C++ , lecture by Bjarne Stroustrup

Training Sand to Think: Artificial General Intelligence & Future of Physics
▶︎

Training Sand to Think: Artificial General Intelligence & Future of Physics

What to teach when AI writes the code | Rainer Stropek | TEDxLinz
▶︎

What to teach when AI writes the code | Rainer Stropek | TEDxLinz

CMake, CPS and Conan: The path to standardized dependency management for C and C++
▶︎

CMake, CPS and Conan: The path to standardized dependency management for C and C++

6. Monte Carlo Simulation
▶︎

6. Monte Carlo Simulation

Elon Musk is the world's first trillionaire. How scared should you be?
▶︎

Elon Musk is the world's first trillionaire. How scared should you be?

Interpretability: Understanding how AI models think
▶︎

Interpretability: Understanding how AI models think