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?

UPDATE:

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:

image 

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

image_3 

Each vertical line represents 4 seconds.

Wednesday, July 11, 2007

Google Bookmarks 'bookmarklet' link in Safari

If you are unable to use the Google Bookmarks 'bookmarklet' in Safari, the workaround is to manually add a bookmark and use the following javascript code for the address.

javascript:(function(){a=window;b=document;c=encodeURIComponent;d=a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();
The issue is the spaces and quotes in the original javascript code do not appear to be correctly decoded in Safari.