What is Vectorization?

Transforming a loop that performs the same computation on each element so that SIMD instructions process several elements at once. It requires no data dependence between iterations.

Field: Compilers

Vectorization in the explanations

Questions that mention Vectorization (4)

  1. Which kind of instruction does a compiler's automatic vectorization use?
  2. Why is the loop above hard to vectorize with SIMD instructions?
  3. Why does a compiler with strict settings not reorder the floating-point sum (a + b) + c into a + (b + c) on its own?
  4. For a loop that sums only the x coordinates as above, why does converting to a structure of arrays (a separate array per field) tend to be faster?

Related terms

SIMD Interrupt Abstract syntax tree Basic block Common subexpression elimination Constant folding Control-flow graph Function inlining Instruction scheduling Intermediate representation

Back to the glossary