Hello all.
Then performing opportunistic optimization, its not always possible to
rework data structures for proper alignment.
So most of the time I have to deal with unaligned data.
My question is - does anyone have the experience with the following
technique:
Allocate memory block (or create in on stack if maximum data size is
small enough and known at compile time). Make it 15 bytes larger then
maximum data size.
Create an "aligned" pointer to the data (like adding 15 to the address
and then clearing less significunt 4 bits).
Copy data into this aligned buffer.
Perform altivec operations.
Copy data back into the structure.
Does anyone tryed it? If yes - what are the conditions then the time
wasted for memcpy would be returned with aligned data access?
Thank you in advance.