Day 25 of Advent of Compiler Optimisations!

We've reached the end of this journey through compiler magic—from simple arithmetic tricks to mind-bending loop transformations. Thank you for following along! Whether you celebrate Christmas or just enjoy a good compiler optimisation, I hope you've discovered something that made you see your code differently.

Read more: https://xania.org/202512/25-thank-you
Watch: https://youtu.be/N1sRfYwzmso

#AoCO2025

Thank you — Matt Godbolt’s blog

The end of the 2025 Advent of Compiler Optimisation

@mattgodbolt Thanks for the series, have a nice Christmas time!
@mattgodbolt thanks for this, I've read some and have others in my reading list for when I have brainwidth for them but it's been really interesting :)
@mattgodbolt oh snap there's videos for all of these? that's great. i wasn't really in a compiler mindset recently but i really wanted to catch up on all of these later. as a pldev enthusiast thanks for making this
@mattgodbolt I absolutely loved the series. Now I can't stop pasting code into Compiler Explorer and try to understand the generated Assembly.

@mattgodbolt Thanks so much for running this series Matt!

(And for the incomparable Compiler Explorer of course!)

Great stuff.

🎆

@mattgodbolt Thank you for giving me the possibility to learn something interesting (and sometimes confusing) about the inner workings of compilers.
@mattgodbolt it definitely made me see how horrible C/C++ is when you look at it in détails: I will remain a zig Stan. I Hope zig will benefit from these optimisations though: the LLVM back end is still being used, I Hope the self hosted one will be just as good.
@tinylittleenormous we support zig on Compiler Explorer too! Go take a look: my guess is it will benefit from a decent amount of the same optimisations
@mattgodbolt Thank you for the series. I asked about switch-cases earlier, and the episode about those (that you had already made when I asked) was even weirder than I expected.
@mattgodbolt I have really enjoyed this series! Thanks so much for making it
@treellama thanks so much!
@treellama oh and I just spotted who you are! Yay! Merry Christmas to you and your family :-)
@mattgodbolt it was great thanks! Still got a few to catch up on but I think it's really helped me with reading assembly
@mattgodbolt Thanks a lot for this series. I really enjoyed it, and looked forward to reading each installment every morning.

@mattgodbolt Thank you very much for the series. I watched all of them and enjoyed each and everyone of them. It has been a long time since my last exposure to assembly code (since 16bit and 32 era when we did not have the luxury of so many registers). And the video series was very refreshing.

Wish you a marry Christmas and happy holidays.