4 ms·
I don't think the T: NonZero bound is doing anything there: the size optimisation is done on the monomorphised/specialised type, not the generic one. In Rust, t
by dbaupp 10y ago
I don't think the T: NonZero bound is doing anything there: the size optimisation is done on the monomorphised/specialised type, not the generic one. In Rust, the concept of a generic types only exist at compile time, and they have no layout. Of course, this is still an example of a generic systems that specializes for performance, in a language that isn't C++.