2

I'm looking for a new machine, mostly to work on videogames as a programmer, and since a lot of the time will be spent compiling huge projects, I was wondering what are the hardware components that influence the most compiling times and to what extent.

For example, I was interested in knowing is SSD would bring a huge benefit into this, so I found this, and a few more threads, and the answer is not really unique, I see.

I would like to know if any of you knows more about this.

Thanks for your time :)

zhed
  • 121
  • 1
  • 3
  • 2
    disk IO and Memory speed are probably the major optimizations you want to look at, assuming you already have sufficient ram. – Frank Thomas Apr 18 '14 at 14:42
  • possible duplicate of [Which PC components make the biggest impact on your compile times for Visual Studio?](http://superuser.com/questions/15972/which-pc-components-make-the-biggest-impact-on-your-compile-times-for-visual-stu) – Ƭᴇcʜιᴇ007 Apr 18 '14 at 16:17
  • Cross-site duplicate (despite the title): *[Speed up compile time with SSD](http://stackoverflow.com/questions/867741)*. The perhaps surprising answer is that the actual compile time is CPU bound, not I/O bound. – Peter Mortensen Nov 03 '14 at 16:59

2 Answers2

2

The Chromium developers suggest the following to reduce compile times, and the list is in decreasing order of impact. Chrome takes 2 hours to build on my computer, so I think they know what's best ;)

  • Use a true multicore processor
  • Have at least 8 GB RAM
  • Disable your anti-virus software for .ilk, .pdb, .cc, .h files and only check for viruses on modify. Disable scanning the directory where your sources reside.
  • Store and build the Chromium code on an SSD.
  • Store and build the Chromium code on a second hard drive that does not have swap
  • Defragment your hard drive regularly.

(Taken from http://dev.chromium.org/developers/how-tos/build-instructions-windows#TOC-Accelerating-the-build)

So as you can see, processor and RAM affect compile time a lot more than using an SSD. If you're going to invest on hardware that speeds up the process, RAM is a better and maybe cheaper alternative to an SSD.

LS97
  • 271
  • 1
  • 6
  • Interesting, I've been reading about these requirements and a lot specify 8 GB RAM, but nobody really mentions the suggested operating frequency. Isn't that a detail to take into account? I believe 8 GB @ 1600MHz could be in most cases preferrable to 16 GB @ 1066 MHz. – zhed Apr 18 '14 at 21:09
  • I guess it's a balance between features. Take a too fast RAM module and a slow CPU won't be able to keep up with it... it probably depends on the weight of the build. – LS97 Apr 18 '14 at 21:14
  • 1
    @zhed Most compilers can't themselves multithread, due to issues with serialization, dependencies, and linkage. That means having a higher frequency and fewer cores is better than the reverse. There are lots of tasks for which an 8-core is great, but compilation isn't really one of them. More info here: http://stackoverflow.com/questions/4430001/which-x86-c-compilers-are-multithreaded-by-itself – Frank Thomas Apr 18 '14 at 22:37
  • The idea is not to have the compiler multithread, but compile multiple units in parallel. – spectras Apr 15 '21 at 18:31
1

Obviously, the answer will vary dependant on the projects you are working on and your current hardware. However, the slowest component of your computer, the hard drive, is heavily used in compiling large projects. Replacing your spinning platters with a SSD would most likely provide the largest performance gain.

Memory would come next, the more the better. More memory means more data can be cached and more memory for VS to use. 8GB would be minimum, 16 would be better. Beyond 16, I dont think you will see a huge improvement.

I would say processor would be last. Even a processor that is 2x faster that your old one cant make up for the slow IO of the disk and memory. In addition, I dont believe compiling takes advantage of advanced processor features.

Keltari
  • 71,875
  • 26
  • 179
  • 229
  • A possible use of beyond 16GB of memory is the fact some of it can be used as a `RAM Drive`. This means you can point your local build environment to this drive, get (most) of the benefits of a SSD, at a fraction of the price. – Ramhound Apr 18 '14 at 16:00