How can I make sure I get the most of it?

Submitted by markos on Sun, 01/20/2008 - 19:20.

Try to use as much aligned data as possible. eg using well known tricks like the following:

 unsigned char __attribute__ ((aligned(16))) *buffer;

instead of just declaring a variable. That way, you'll skip the time spent on handling unaligned data. Also, try to avoid useless invocations of memcpy() or similar functions for tiny buffers. Though GCC is supposed to inline copying code for some cases, this is not guaranteed and should not be taken for granted all of the time. Instead try to organize your data into bigger structures. It's better in the long run anyway.

( categories: )