<< Newer Article #214 Older >>

New Computer

I recently upgraded to a new laptop, a Dell Latitude D830 (Santa Rosa chipset) running a 2.4GHz Core 2 Duo with 4GB of RAM and a new DX10 video card, the nVidia Quadro NVS 140M. I went ahead and installed Vista 64-bit on the machine, in order to be able to take full advantage of the 4GB of RAM. Since I do most of my MAME development on this machine, compliation speeds for building MAME are of utmost importance.

Below is a summary of complete build times for MAME using both my previous laptop (Dell Inspiron 8600 running a 2.0GHz Pentium-M with 2GB RAM) and the new one. I tested both debug and optimized builds using both Visual Studio 2005 and gcc.











Old SystemNew SystemImprovement
CPU Cores12+100%
RAM2GB4GB+100%
Build with VS2005, DEBUG=1 SYMBOLS=19:384:15-56%
Build with VS2005, PM=111:274:42-59%
Build with VS2005, PM=1 MAXOPT=120:4810:51-48%
Build with gcc, DEBUG=1 SYMBOLS=110:205:02-51%
Build with gcc, PM=117:056:49-60%

Since the new machine is a dual-core system, I was curious to find out if running a make with -j3 was better than running with -j2. I had heard that it is best to run make with a -j parameter equal to the number of CPUs you have available, plus 1 to help take advantage of extra CPU power while waiting for I/O to complete on other threads. Using the Visual Studio 2005 SP1 build as a test case, it turns out that -j3 does win slightly over -j2, producing a complete MAME build in 4:15 (-j3) versus 4:25 (-j2). Interestingly, when I tried this on my old single-core machine, it was slightly slower to use -j2 versus -j1.

I was also curious to see how much slower it was to do an optimized build using the Visual Studio compilers. A basic optimized build is not that much slower than an unoptimized build (4:42 versus 4:15). However, turning on link-time code generation -- which reduces the final output EXE size by a large amount and provides a marginal additional speedup -- more than doubles the build time to 10:51.

Comparing Visual Studio builds to gcc builds, it seems that the difference is not as pronounced as the last time I measured it (5:02 versus 4:15 for the debug build). This is partly due to the extra overhead of Visual Studio 2005, which is noticeably slower than Visual Studio .NET 2003, which I haven't tried installing under Vista. In the end, it doesn't much matter since debugging with Visual Studio is a huge win over trying to debug with gdb, so I'd still use it a lot even if it were slower!