News for hackers. Stuff that matters.
Re:The Serde Rust Framework by hawk_ on Friday October 15, 2021 @05:09AM (#28875794)
thanks and is the padding for aligned access (wasted space) or just full byte (poor performance on non x86/64 like architecture)? because that's the interesting part as to what's the tradeoff chosen and whether a dev can choose a different one. Any doc references are appreciated.
Re:The Serde Rust Framework by Nullabillity on Friday October 15, 2021 @07:46AM (#28876725)
They are padded for aligned access, so on amd64 Option<u64> will be 16 bytes.[0] However, the unused discriminant values are counted as niches for enums wrapping that, so Option<Option<u64>> is still 16 bytes (for example).

[0]: https://play.rust-lang.org/?version=stable&mode=debug&editio...