<< Newer Article #200 Older >>

Benchmarking With 64 Bits

I've been wanting to do some more extensive benchmarking, and now that I have a modern machine, I figured it was a good time. Some interesting things I wanted to understand were:

Well, here are the results (yes, you'll probably want to click to see it right):

A few interesting observations from here:

The -mt switch definitely helps with benchmarks, no doubt about it! But benchmarks are testing an unrealistic scenario: running faster than the game should. It is worth point out that it does also help a little bit with games that have trouble pushing full frame rate, but only by about 5%. This makes sense, since there is a little bit to be gained just from avoiding the blit on the primary CPU.

Comparing gcc versus Visual Studio, I have to say Visual Studio definitely comes out on top pretty consistently. The biggest exceptions were Ridge Racer and Star Wars, which both took a 10% dive under MSVC. On the flip side, Primal Rage and Sexy Parodius were 20% faster under MSVC. (I sense R. Belmont's conflicting feelings over this result.) Interestingly, the gcc binary was about 1.5MB smaller than the MSVC binary with the same optimizations.

Link time code generation (enabled in MAME by setting MAXOPT=1 when building using the MSVC toolset) had only a minor performance benefit on average. And the benefit on the 64-bit builds was even less than that on the 32-bit builds. However, it did reduce the size of the 32-bit binary by about 5MB! And the 64-bit binary got 3.5MB smaller.

Finally, the 64-bit question: yes, absolutely, with the MSVC toolset, the 64-bit builds were consistently faster -- and in a few cases significantly faster -- than the 32-bit builds. There were a few black eyes for the 64-bit builds, but they are all cases where the lack of a MIPS recompiler for 64-bit put the games at a significant disadvantage. Killer Instinct in particular utterly crawls without the recompiler (they use a lot of lwl/lwr/swl/swr instructions which are worst case for the memory system). The Seattle and Vegas games, on the other hand, were slower, but not nearly as slow as I would have expected. Even with a super simple 64-bit drc, they should smoke the 32-bit versions. You'll also note that Raiden Fighters Jet crashes on the 64-bit builds -- guess we're not fully 64-bit clean yet!

One thing that seems pretty consistent is that the 64-bit builds do really well on games that do 3D rendering. I can only attribute this to having more registers to play with in the innermost rasterization loops. Ridge Racer was an impressive 50% faster in the 64-bit build. Radikal Bikers was 30% faster.