disclosure: I\'ve tried similar question on programmers.stack, but that place is nowhere near activity stack is.
Intro
I tend to work with lots
You should compile with a recent GCC (so having compiled your GCC 5.2 is a good idea, in November 2015), and you should enable optimizations for your particular platform, so I suggest compiling with gcc -Wall -O2 -march=native
at least (try also to replace -O2
with -O3
).
(Don't benchmark your programs without enabling optimizations in your compiler)
If you are concerned with cache effects, you might play with __builtin_prefetch
, but see this.
Read also about OpenMP, OpenCL, OpenACC.