Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking to buy a new computer soon, and I want a machine for best performance for fast compilation times.

So should I care to get a quad-core CPU with highest GHz I can afford, or should I instead invest into higher speed RAM?

What is your recommendation for what type of RAM should I go for?

Graphics performance doesn't matter, compiling loads of software & running mathematical simulations.

share|improve this question
up vote 6 down vote accepted

I would say neither. Rather get a fast SSD hard drive. Of course you need a proper CPU and amount of RAM as well, but yeah...

share|improve this answer
Well, I didn't get an SSD, instead I got 32GB of RAM and compile everything in RAM on tmpfs.... even faster than SSD =) – Dima Jul 11 '13 at 10:23
Well, that's kind of the same idea :p – Svish Jul 11 '13 at 10:53
I disagree. I got an SSD drive for my laptop and it made little difference in compilation speed. On the other hand, getting a new computer with almost triple the CPU speed and only 4GB vs 6GB on the SSD machine made compiling almost 3 times as fast. finds no noticeable compiler speed improvement with an SSD while… finds 23% improvement. It seems logical to me that if you have enough memory, compiling involves very little disk usage. – Chris Dragon Nov 19 '13 at 22:05
Another thought is it's possible some compilers use lots of temp files to compile rather than memory, in which case an SSD or ramdisk would help the most. However, I wouldn't expect modern compilers to be engineered that way now that memory is cheap and big and the system handles paging it to disk when it runs low. Using XCode 3.2.6 (based on gcc 3 or 4), SSD had little benefit. – Chris Dragon Nov 19 '13 at 22:16
An SSD makes a considerable difference on large projects/solutions that heavily utilize file copying/moving. I haven't used RAM tmpfs-style, personally, but I have heard good things about it. For smaller projects, it's probably fine. For huge ones? It could be insufficient. – kayleeFrye_onDeck May 11 '15 at 16:37

Probably RAM will give you a bigger bang for the buck. Compiling, especially large applications, is very I/O intensive, and having more RAM means you can save more time paging to and from disk. Most CPUs today, especially if you go with a cheap quad-core, will provide plenty of CPU power for your compiling, but having the RAM will help with the data going back and forth.

On 2nd thought, it sort of depends on your math simulations and build processes. Are they parallelizable? If not, adding more cores won't really do anything to speed it up, although the new Intel chips (Core i7) are quite fast on a per-core basis.

share|improve this answer

Well graphics could help because a graphics card with a cpu on it can reduce load on the main cpu. CPU power is probably more important then RAM, but the better both are the better off you would be.

share|improve this answer
Good point - only if the process could use CUDA cores, which most don't. – NoBugs Nov 5 '13 at 8:20

I'd say get loads and loads of RAM and use ramdisks for temporary storage. This will dramatically increase speed of compilation. A fast multi-core CPU would be fine too, but I think that you'd benefit more from lots of ram. Take a look at this article for some ideas. Here's some more information and some more here. I think that using RAM will be faster than using SSD, but I could be wrong.

share|improve this answer

For your computations, your processor is by far most important.

The compilation will stress both your processor and RAM.

I think your most cost effective solution would be to get the best CPU you can afford, and preferably a Quad core. With RAM being as cheap as it is (DDR3 is now as cheap as DDR2), you can easily plug in as much RAM as you need for little coin (16 GB of DDR3 for $180 on newegg ... I realize that is overkill, just trying to demonstrate how cheap it is). So I would invest as much as I can afford on a quality CPU as possible.

share|improve this answer
Spending more money to get a faster CPU is good advice. But not spending more money to get more cores. GCC does all its compilation in a single thread, so it never uses more than one core. – Isaac Rabinovitch Nov 21 '12 at 4:21
@Isaac Yes, but the build system can usually spawn multiple gcc jobs simultaneously, eg make with the -j option. Also, I believe llvm can or will be able to compile a single file using multiple threads. – Wallacoloo May 3 '13 at 22:49
@Wallacoloo OK, you can sometimes get a little extra speed when you have files that are parallel in the dependency graph. Still, I believe that extra cores are a pretty minor factor when it comes to speeding up a build. Hard to tell, since extra cores are a standard feature in newer CPUs that do speed things up just by clocking faster. If you want to demonstrate that I'm wrong, try doing a big compile with and without -j. – Isaac Rabinovitch May 4 '13 at 2:40
@IsaacRabinovitch Actually on large code bases it matters alot. On our codebase compilation time is reduced almost linearly with distcc (make -j8 (locally) up to make -j30 (distributed over the network)) – Alex May 15 '14 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .