Today I was doing some coding where I needed to do a bit of coding, a build, more coding, another build etc very often, so I thought about ways to speed up the build.
One thing I came up with, given that the build seems to be a pretty disk-intensive operation (although one CPU is generally pegged to 100% during a build), was to try doing the build on a
RAM disk, to remove any potential hard drive bottleneck.
Without going into too much detail, I found that a full build from the RAM disk took on average 22 seconds, and a build from the hard drive took around 27 seconds. This is just 5 seconds difference, or a 19% performance improvement.
In my case I didn't feel like the extra effort was worth the performance gain, however for a large project, 20% could mean a minute or more, which if you're doing any more than a few builds per hour this could soon add up.
The environment I tested on, incidently, is Windows XP Professional, Visual Studio 2008, and a 15-project Windows Forms solution, roughly 100k lines of C# .NET 2.0 code. The machine is a Dell Poweredge SC440 with 2GB RAM and an Adaptec SATA RAID card set up with two drives in a RAID 1 (mirror) configuration. The testing was pretty unscientific - but the results were consistent enough to prove my point.
Something I might consider is striping the two 250GB drives together in
RAID 0 to see if that gets me a decent performance increase over the RAID 1, but somehow that seems like a lot of unproductive time where my main box is out of action, just to try and get a bit of extra performance.
In a nutshell, in my opinion, don't bother trying to compile code in a RAM disk unless you have a really big solution and do very frequent builds.