u/ha9unakain r/rust • Recommends
On “multiply to shift optimization not used?”
Matt Godbolt has a great video on these kinds of tricks the compiler uses!
#compilerexplorer#x86assembly#compileroptimizations
22K subscribers • 2 videos on Hallway
Intermediate. Assumes working knowledge.
21K views11 months ago1 recommendation
Systems programmingProgramming languagesCompilers and interpretersPerformance and optimizationCPUs and computer architecture
Matt Godbolt explains how compilers optimize simple integer addition on x86 architectures using unexpected instructions.
Day 2 of the Advent of Compiler Optimisations - Adding Integers (on x86) Adding integers is simple, right? Just an ADD? The compiler has some better ideas, at least on x86! Blog post: xania.org/202512/02-adding-integers This series will cover various fun compiler tricks and optimisations I've spotted in my years of playing around with Compiler Explorer. There will be 25 episodes in total, each with an accompanying blog post. All videos: youtube.com/playlist?list=PL2HVqYf7If8cY4wLk7JUQ2f0JXY_xMQm2 Support CE: patreon.com/c/mattgodbolt github.com/sponsors/compiler-explorer Shop for CE swag: shop.compiler-explorer.com/ Music by nocturnalplant - youtube.com/c/nocturnalplantWhat people say. Recommended as a great video demonstrating the clever tricks compilers use to optimize code.
u/ha9unakain r/rust • Recommends
On “multiply to shift optimization not used?”