• 03/26/2021
  • Public Content

Introduction to Auto Vectorization

For the Intel® Compiler, vectorization is the unrolling of a loop combined with the generation of packed SIMD instructions. Because the packed instructions operate on more than one data element at a time, the loop can execute more efficiently. It is sometimes referred to as auto-vectorization to emphasize that the compiler automatically identifies and optimizes suitable loops on its own.
Intel® Advisor can assist with vectorization and show optimization report messages with your source code. See https://software.intel.com/content/www/us/en/develop/tools/advisor.html for details.
Vectorization may call library routines that can result in additional performance gain on Intel microprocessors than on non-Intel microprocessors. The vectorization can also be affected by certain options, such as
Vectorization is enabled with the compiler at optimization levels of
(default level) and higher for both Intel® Microprocessors and non-Intel® Microprocessors. Many loops are vectorized automatically, but in cases where this doesn't happen, you may be able to vectorize loops by making simple code modifications. In this tutorial, you will:
  • Establish a performance baseline
  • Generate a vectorization report
  • Improve performance by aligning data
  • Improve performance using Interprocedural Optimization
This tutorial is available in Linux*
, macOS*,
and Windows* versions.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.