Re:Learn C The Hard Way
by nitrogen on Sunday July 03, 2011 @06:59AM
(#2723482)
You'd be surprised what the compiler still doesn't do. For example, when writing a toy high-performance memory allocator for a university class, I was able to gain a significant[1] performance boost by replacing __attribute__((packed)) structs with pointer arithmetic #defines for the allocation block descriptors, with an identical memory layout.
[1] I don't remember the exact gain, but it was at least 10%.
[1] I don't remember the exact gain, but it was at least 10%.