Hacker News new | past | comments | ask | show | jobs | submit login

What I do instead (given the excellent sibling replies about how it's not that simple) is store the value in a `u64` and then provide a method to decode it into a non-layout-optimized enum. Since that enum is not stored anywhere but the stack, it can be optimized out if the decoding is inlined: https://github.com/rpjohnst/dejavu/blob/a768ce515b3a110542aa...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: