Original discussion: https://internals.rust-lang.org/t/automated-data-oriented-design-dod-transformations/18011
Problem:
enum E {
A(u64, u32, u16, u8, bool),
B(u64),
}
If you add anything to variat B
, the size of the enum jumps from 16 bytes to 24, even though the tag byte should continue to be able to be shared with the bool. It's possible that this is intentional, but we couldn't figure out conclusively why in IRLO.