Optimising datastructure/word alignment padding in golang
Currently there’s no compile-time optimisation; the values are padded to 8 bytes on x64. You can manually arrange structs to optimally utilise space; typically by going from larger types to smaller; 8 consecutive byte fields for example, will only use 8 bytes, but a single byte would be padded to an 8 byte alignment, consider … Read more