Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Optimizing C++/Code optimization/Compile time optimization

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

When possible put code that is reused into .cpp files and compile as reusable libraries instead of placing more code in header files to minimize the amount of redundant compilation. Use templates to speed up compile time by compiling the parts of the interface that you use rather than compiling every possibility all the time, one particular use case here is for macros. Minimize included code to only include the exact features you need, rather than using catch all include files Use forward declarations to avoid including files because it completely eliminates redundant compilation of code.