Today I found this out
January 10, 2010
(after spending much of the day banging my head against the wall)
January 10, 2010
#include <stdio.h> struct test1 { double b; }; struct test2 { int a; test1 b; }; test2 foo; int main() { printf("%d\n",(int)&foo.b.b - (int)&foo); return 0; }What does this print? On Windows, it prints 8. On OS X (or linux), it prints 4. Which means, if you access foo.b.b a lot, it will be slow. UGH. I guess that's why there's -malign-double for gcc. Now if I can just figure out how to enable that for Xcode...
Recordings:
freeform jam with brennewtnoj
Posted by Scott on Mon 11 Jan 2010 at 06:12 from 86.169.237.x
Posted by Justin on Mon 11 Jan 2010 at 07:00 from 74.66.229.x
Posted by Justin on Mon 11 Jan 2010 at 07:08 from 74.66.229.x
Posted by Lubo on Wed 20 Jan 2010 at 16:33 from 90.154.197.x
Posted by Lubo on Wed 20 Jan 2010 at 16:40 from 90.154.197.x
Posted by Lubo on Wed 20 Jan 2010 at 17:24 from 90.154.197.x
Posted by Justin on Wed 20 Jan 2010 at 17:32 from 204.11.104.x
Add comment: