野百合也有春天

导航

提高C++编译速度

  • 编译大型工程的时间很大程度上取决于头文件的数量和深度。【The time it takes to compile a large project can depend greatly on the number and depth of #include files .】
  • 使用并行编译
  • 使用分布式编译:Incredibuild
  • 尽量使用前置声明【Forward declarations are a common solution】
  • 将代码从头文件称至CPP文件【Pushing code from headers down into source files can work.】
  • 使用预编译头文件

posted on 2012-04-03 14:34  flydream  阅读(510)  评论(0编辑  收藏  举报