3 ms·
Depending on the values in b, you could do bit-packing in C++ and munch it down to just 1 byte.
by fxtentacle 5y ago
Depending on the values in b, you could do bit-packing in C++ and munch it down to just 1 byte.
- zozbot234 5y agoYou can only do bitpacking if individual fields of a struct cannot be accessed via reference (or 'borrowed', in Rust terms). While C/C++ includes the 'register' keyword which forbids reference access, Rust does not.