How Can I Build Faster?
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How Can I Build Faster?

This topic contains tips for reducing the amount of time it takes to build a project.

  • Reduce the number of header files Visual C++ must include and check for every build.

  • Use precompiled headers. See /Y (Precompiled Headers) for more information.

  • When calling cl.exe directly, do not invoke the compiler once for every source file; pass all source files to cl.exe in the same invocation to create .obj files.

  • Use minimal rebuild; see /Gm for more information.

  • Use incremental linking; see /INCREMENTAL for more information.

  • Use #pragma once, when appropriate. For example, if your headers use include guards.

  • Dynamically link to the CRT; see /MD for more information.

  • Use multiple processes to build; see /MP for more information.

Additional topics include:

© 2015 Microsoft