Aligning Data
Offload KB - performance
Old Content Alert
Please note that this is a old document archive and the will most likely be out-dated or superseded by various other products and is purely here for historical purposes.
Aligning data within an Offload™ context can provide a wealth of optimization opportunites for the compiler. The Playstation 3 SPUs are most efficient when operating on data aligned to at least 16 bytes. Offload™ is able to perform more optimizations on data accesses when it knows the alignment of the data.Offload™ supports both the Microsoft Visual Studio __declspec(align(#)) and GCC __attribute__((aligned((#)))) specifiers to increase the alignment of types and variables.Increasing the alignment of data accessed inside Offloaded code to 16 bytes or more results in:
- Fewer reads from the software cache,
- Faster memcpy's
- Higher performance memory access intrinsics