From Jason Turner
Watch on YouTube

Summary

This episode explores how using structs to group related data can lead to more efficient code, particularly on the 64-bit Intel ABI. Jason demonstrates that passing a struct containing multiple uint8_t values can result in more efficient register usage and function calls compared to passing each value individually as separate parameters. The compiler can pack small values into a single register when they're organized as a struct, potentially reducing the number of required register operations and stack manipulations.

Resources

Tags