Which PC specifications have the biggest impact on your compile times? Disk? Clock speed? Number of CPU cores?

  • 1
    Isn't this a programming question? Would it have a bigger audience on StackOverflow? – Kurt W. Leucht Jul 30 '09 at 20:52

Scott Gu also posted about what affects building speed, pointing mainly to I/O resources such as the hard disk.



The factor that I've found makes the biggest difference isn't a physical factor, but a software one: Which anti-virus do you have installed?

Some anti-virus products don't handle software development very well - they see all these application files being rewritten, suspect foul-play and rescan every file every time.

(See https://stackoverflow.com/questions/1170078/is-it-usual-for-aspx-files-to-take-5-10-seconds-to-save/1170129#1170129 for more.)

On the other hand, if you're wanting to improve the performance of an existing machine, nothing beats maxing out available memory for a quick win.

  • PC in the office is using the TrendMicro OfficeScan. My dev laptop at home is using AVG 8. – Rob Allen Jul 30 '09 at 20:05
  • 3
    "Trend Micro". Oh dear. If you can't get that changed for something else, kiss goodbye to any performance at all. – Bevan Jul 31 '09 at 2:53

Here's some nice research from Scott Hanselman on using multiple CPUs for MSBUild. The speed-ups are pretty dramatic.

Edit: I should note however, that in order to have a good experience using Visual Studio, you need plenty of RAM. :)

  • +1 Good article on the topic. I forgot about that. I think he also did a podcast regarding this. – BinaryMisfit Jul 30 '09 at 19:46

My personal experience with a fair-sized C++ code base:

Old machine

Processor: Pentium 4 HT 3.06 GHz
Memory: 1 GB DDR RAM (PC 2100, so 333 MHz)
Disk: 7200 RPM hard drive (UDMA 100, if memory serves)
Compile time: 50 minutes

New machine:

Processor: Core i7 720QM (8 logical processors) at 1.6 GHz, turbo boost to 1.73 GHz when all cores are active
Memory: 8 GB DDR3 RAM at 1066 MHz
Disk: 7200 RPM hard drive (SATA 2)
Compile time: 4 minutes (with /MP)

Conclusion: The more processors, the merrier -- even at relatively low clock speeds. An SSD would improve times further, but from observation of the compilation messages, I doubt it would improve it by more than 30 seconds or so.


As far as I remember mainly Processor and Memory. A quick google did reveal various tweaks that can improve compile times.

Joel recently posted about the effect of Solid State Disks on compiles here. Disk speed does generally not improve compile time drastically. However according to this it does have an effect as pointed out by lyngbym.


For building C++ programs, the #1 factor before all else is structural - if the source code is heavily vertically structured, it will have a devastating impact on build times, especially incremental builds. I locally restructured a few portions of a project for a dramatic improvement on a quad-core Xeon. 18 months later and they (the people who own the project) still can't match my wall-clock build times even on Core i7 machines.

The effect (positive or negative) of your software layout multiplies across every member of your team and every build they perform.

  • Do you have a link that describes different code structures please. I think I know what you are referring to but I'm not certain. – Rob Allen Aug 11 '09 at 18:07
  • I'm having trouble finding my references, but the general idea is 1) use forward declarations where possible, 2) include files only when a forward declaration won't work, and 3) make sure the file you include doesn't declare more things than necessary, which in turn could make it include more files you don't otherwise need for the particular source file being compiled (aka keep your headers small and use forward declarations in them just like you do for source files). – Sam Harwell Aug 11 '09 at 19:01

Xoreax IncrediBuild is a distributed build system that has made a huge improvement on compile times where I work. (Unfortunately, link times are still pretty long, particularly release builds using whole-program optimization and link-time code generation, but that's to be expected.)

alt text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.