News for hackers. Stuff that matters.
Re:The Rust Calling Convention We Deserve by ratmice on Friday April 19, 2024 @06:29AM (#40085071)
Yeah, `NonZero*` but also a type like `#[repr(u8)] enum Foo{ X }`, according to `assert_eq!(std::mem::size_of::<Option<Foo>(), std::mem::size_of::<Foo>())` you need an enum which fully saturates the repr, e.g. `#[repr(u8)]Bar { X0, ... X255}` (pseudo code) before niche optimization fails to kick in.
Re:The Rust Calling Convention We Deserve by saghm on Friday April 19, 2024 @12:48PM (#40089059)
Oh, good to know!