3 ms·
i definately agree with the 'lost art' part. i've been stunned to find programmers who don't understand this and make arguments like "the compiler optimises tha
by jheriko 12y ago
i definately agree with the 'lost art' part. i've been stunned to find programmers who don't understand this and make arguments like "the compiler optimises that for you"... so much so that i've written my own piece on this, and more than once (and in more or less detail in various places - i.e. bitfields):
http://jheriko-rtw.blogspot.co.uk/2011/02/know-your-cc-struct-layout-rules.html http://jheriko-rtw.blogspot.co.uk/2011/02/know-your-cc-struc...
http://jheriko-rtw.blogspot.co.uk/2012/01/c-struct-layout-optimisation-revisited.html http://jheriko-rtw.blogspot.co.uk/2012/01/c-struct-layout-op...