|
|
PowerPC double Alignment
While PowerPCs have hardware support for 4-byte aligned 8-byte doubles, you still pay a performance penalty if you use that support. The penalty is nothing like horrendous penalty for unaligned 8-byte access (2,372% overhead!), but it's still measurable. Indeed, I measured it myself without realizing it:
This is a marked-up version of my paper's "Multiple Byte Access Comparison #2" chart. Note how 8-byte (64-bit) access times are the slightly faster than the 4-byte (32-bit) access times when they're evenly divisible by 8 (annotated by the green rectangles). Then note how the 8-byte access times are slower than the 4-byte access times when not divisible by 8 (the red circles). Tim also notes that the Mac OS X ABI does not enforce 8-byte aligned doubles, so by default your structs may suffer from unnecessary memory access overhead. Fortunately, you can pass a Friday, November 07, 2003
|
Contact Me Topics RSS Feed Linkblog
Bill Bumgarner Brent Simmons Daniel Jalkut Dave Dribin Eric Albert Eric Rescorla Eric Sink Greg Miller Gus Mueller Jeremy Zawodny John Gruber Mark Dalrymple Michael Tsai Peter Ammon Raymond Chen Ryan Wilcox Scott Stevenson Steven Frank The Daily WTF we hates software Wil Shipley |
Copyright © 1997-2010 Jonathan 'Wolf' Rentzsch. All rights reserved.
Questions? Comments? Contact Me.