From Jason Turner
Watch on YouTube

Summary

This episode explores the Advanced Bit Manipulation (ABM) and Bit Manipulation Instruction (BMI) sets available in modern CPUs. Jason demonstrates how these specialized instructions can optimize bit manipulation operations in C++ programs. He uses Compiler Explorer to show which C++ expressions various compilers (GCC, Clang, Visual Studio) can successfully translate into these efficient CPU instructions, noting that compiler flags like -march=native are essential to take advantage of these optimizations.

Resources

Tags