Auto-vectorization in C++ compilers

April 13, 2012 Francisco Almeida Uncategorized

“Premature optimization is the root of all evils”… unless the compiler does it for you.

Auto-vectorization is the next best thing to auto-parallelization: the compiler statically analyses the code and speeds up tight loops by spreading the iterated values across as many available registers as possible, resulting in speed-ups that could go as high as a factor of four. If the CPU has the required instruction set, of course.

If you’re curious about how this can benefit your code (and without requiring anything at all on your part!), watch this nice video interview in MSDN Channel 9: VC11 Auto-Vectorizer.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Powered by WordPress. Designed by elogi.