As exemplified by Jed Brown's answer to Costs of lookups versus calculations, using vectorized vs non-vectorized floating point operations results in much faster code. Many modern compilers claim that they can perform automatic vectorization. How do I which parts of my code are being successfully vectorized?
With the Intel compiler of any modern vintage,
-O3 -vec-report3. Optimization level three guarantees that it's trying to vectorize, and the vector report will tell you what it's doing.
The GNU page on vectorization says that it's on by default at optimization level 3, but I can't find the equivalent of vec-report.
Within the GNU compiler collection, you have the option
n is a number between 0 and 6 which will print information similar to