u/mttdin r/Compilers • Recommends
C++ Switch Statements Under the Hood in LLVM - Hans Wennborg
4.8K subscribers • 2 videos on Hallway
Advanced. Deep dive for people who know the field.
4.3K views1 year ago2 recommendations
Systems programmingProgramming languagesCompilers and interpretersC++Performance and optimization
Hans Wennborg explores how Clang and LLVM optimize and compile C++ switch statements into lookup tables, bitmasks, and decision trees.
Are switch statements more efficient than if-else chains? How do they get optimized? This deep dive into Clang/LLVM's handling of the switch construct will tell you everything you wanted to know, and probably more. The event was kindly hosted by think-cell, think-cell.com Event page: meetup.com/stockholmcpp/events/304293099/ More information about C++ in Sweden and around the world at swedencpp.seWhat people say. Recommended as an interesting deep dive into compiler optimizations for switch statements.
u/mttdin r/Compilers • Recommends
u/PeanutHungry5293in r/C_Programming • Recommends
On “Are switch statements faster than if statements?”