Monday, July 16, 2007

Recent Mono / MS JIT observations with #64

Some time ago, I had run #64 using the Mono and MS runtimes.  Judging on the timeframe of my post, I expect I was running version 1.2.3.

Everything worked great; however, there was a fairly significant delta in performance between the two, Mono falling quite short of the MS runtime. It didn't concern me at all, as the emulator was still running at 100% the performance of the original C64.

I am now running version 1.2.4.

I ran the emulator under both runtimes for about 90 seconds, and monitored the CPU usage under the Performance Monitor.  I started monitoring after the emulator had fully started up, to exclude JIT overhead.

Command Line CPU Usage (%)
Average Minimum Maximum
mono TestHost.exe 38.813 29.687 67.187
TestHost.exe 45.229 21.875 59.375

Granted, these tests aren't entirely scientific, but for 90 seconds, the average is quite different, in Mono's favour.

Could the recent patches to the MS runtime be causing the drop in performance?


Turns out that my machine was set 'Maximum Battery' mode.  In 'Maximum Performance' mode.  I wonder why Mono performs better in this scenario?

When reverted to 'Maximum Performance', the CPU usage of Mono didn't change (~38%) and is fairly consistent:


whereas the MS JIT jumps from 20% to 40% in cycles, as follows.


Each vertical line represents 4 seconds.

No comments: