Would installing Visual Studio on an SSD improve compiling speed noticeably?

Kadence

Senior member
Nov 18, 2004
275
0
0
Visual Studio usually takes some time to compile projects for me. I may be 15-20 seconds only, but as I'm often changing code in minor ways and constantly and re-compiling, it gets tedious.

Currently I'm looking to get a dedicated server which I'd connect with using RDC, and use for Visual Studio, and am wondering what specs I should get.

If the machine had an SSD with both the OS and Visual Studio installed on it, would that improve performance noticeably? Or would the different be negligible?

Also - does having multiple processors help the speed of Visual Studio compiling at all?
 

BrightCandle

Diamond Member
Mar 15, 2007
4,762
0
76
I have done a few different tests in regards to the performance of compiling, mainly in the Java, Scala and Erlang. In general I have found compilation speed is improved by an SSD, but how much depends very much on how hard the language is to compile.

For example I have projects in Java that compile 3x faster on an SSD. Its a massive increase and its due to all the small files and a relatively simple language to compile. Conversely a typical Scala project will be about 10-20% faster on an SSD. The reason is that while the files are also small the CPU dominates the compilation process due to the complexity of the language. Erlang is some where in between. But all these compilers are mostly single threaded.

Visual C++ at least for me is multithreaded, and it does show slight improvements in compilation speed for my project on an SSD compared to a drive. But its not a lot because the thread count ensures most CPUs are busy anyway.

I have never tested Visual Studio C# so I would suspect its somewhere in results between Java and Visual Studio C++. Visual C++ uses multiple threads to compile different files, but I suspect the C# compiler works more like the Java one since its similar language. Seeing as how C# is simpler to compile than C++ also I would suspect it too will need less CPU.

So an SSD is almost certainly going to decrease compile times, but how much I don#t know. What I do know is you want the fastest CPU you can get. The moment you drop an SSD into the machine you will immediately become CPU dominated, and overclocking will bring linear gains. Any SSD will do the job (an old Intel 80GB gen 1 SSD is just as fast as the latest greatest), but CPU wise depending on the number of cores you can use (check task manager) you want as many cores as the compilation will use and then as much clock speed as you can get.

I would also say its a good idea to add another core or two for the purpose of a profiler. These can be quite heavy in themselves and you don't want it fighting for CPU resource that the program is trying to use.
 

Kadence

Senior member
Nov 18, 2004
275
0
0
I will be coding in regular C++.

So you're saying another processor may help more than an SSD? Thanks for the reply.
 

Elixer

Lifer
May 7, 2002
10,371
762
126
Are you using precompiled headers ?
Also, if your project is split into many files, then, yes, the more cores you have, the faster it will compile.

In any case, if you are IO bound, then, yes, a SSD will help. If you are CPU bound, then, nope, won't make a difference.
 

TheRyuu

Diamond Member
Dec 3, 2005
5,479
14
81
Short answer is it probably depends.

Keep in mind that after the first compile everything is going to be cached so if you're compiling the same thing over and over you're not really touching the HDD (for reads, provided it stays cached in the RAM). All of the compiled object files will obviously be written although those are cached as well.

Visual Studio can use multiple cores in two different ways. Under the main build and run options for Visual Studio you can set the number of parallel jobs where it will compile non-dependent projects at the same time. You can also set on a per project basis the /MP option (under general) which will have it use all your processor cores/logical threads (this is not compatible with certain debugging options). Just be careful with both of these combined because you can wind up spawning a rather large number of compiler instances (as each project will be spawning enough to use all of the cpu) so what you use will likely depend on your project makeup.