Day 5 of Advent of Compiler Optimisations!
x86 has LEA for multiplication tricks, but what does ARM bring to the party? Meet the barrel shifter—a hardware feature that lets many instructions shift their second operand. The compiler exploits this to turn multiplications into shifted adds, all in a single instruction. Different architectures, different superpowers!
Read more: https://xania.org/202512/05-barrel-shifting-with-arm
Watch: https://youtu.be/TZubUyr2UEY