3 ms·
Or the opposite, as packing usually requires slower, unaligned accesses.
by saagarjha 6y ago
Or the opposite, as packing usually requires slower, unaligned accesses.
- sumtechguy 6y agoThat would depend on how much that struct is created in memory vs the total code that uses it. If you have one instance in memory then yeah the code is probably bigger and slower (depending on arch). But if you have thousands of the structs in memory the speed and code size trade off may be worth it on a memory constrained system. Debug also sometimes turns on overrun buffers so you can check for over/under runs in your code at debug time. Some compilers have this others dont.
- deleted 6y ago[deleted]