3 ms·
> The only good reason to use packed structures is when you need to map some memory (e.g. hardware registers exposed to memory) bit by bit to a structure. Alth
by tialaramex 3y ago
> The only good reason to use packed structures is when you need to map some memory (e.g. hardware registers exposed to memory) bit by bit to a structure.
Although unaligned access isn't fast especially if it's not directly hardware supported, it's still much faster than all the options where there just isn't enough memory.
It's... unfortunate that C doesn't standardize any of this.