# Disable Automatic Vectorization

This content is specific to C++; it does not apply to DPC++.

The compiler finds possibilities to use SIMD (SSE/AVX) instructions to improve performance of applications. This optimization is called automatic vectorization.

In most cases, this optimization involves transformation of loops and increases code size, in some cases significantly.

Disabling this optimization may help reduce code size at the expense of performance.

Options to specify:

Linux*: | -no-vec
Windows*: | /Qvec-

Advantages of this method: | Compile-time is also improved significantly.
Disadvantages of this method: | Performance of otherwise vectorized loops may suffer significantly. If you care about the performance of your application, you should use this option selectively to suppress vectorization on everything except performance-critical parts.

Notes:

Depending on code characteristics, this option can sometimes increase binary size.

Parent topic: Methods to Optimize Code Size