Re:Rust: 128 bit integers preparing to be released
by ben0x539 on Sunday December 04, 2016 @03:50AM
(#13099319)
Isn't the indirection overhead of a []byte more expensive than a spare 12 inline bytes?
Re:Rust: 128 bit integers preparing to be released
by dbaupp on Sunday December 04, 2016 @12:04PM
(#13100618)
Yes, and a []byte is even going to have at least as much inline overhead: it stores 24 bytes (length, capacity, pointer), and of course plus the 4 bytes of actual data. Even on a 32-bit platform, the []byte inline storage is 12 bytes.
Sorry for the rhetorical device.