Post

Yes that's the code that does it and how I originally found about it a few years ago. It explains what happens but not why (well for the alphabetical order, the rest is for padding/alignment).

Amazing but please 🙏 put a disclaimer somewhere that while this sort of micro optimization can be beneficial in things like graphics & high frequency problems, it's not something your average dev should worry about I can already see the PRs from junior devs: "Romain Guy said to rename variables" 😂

Thank you for your blog post. I often read that cache misses can drop performance. Which you also face when using data structures like linked lists (pointer chasing). But was not aware that this can reduce the performance so much.

My life was so much better before reading this. 😭😭 My brain will subconciously keep this information in mind forever now.