[IronPython] Microsoft .NET vs. Mono on running IronPython

Miguel de Icaza miguel at novell.com
Sun Apr 22 19:58:27 CEST 2007


> Indeed, if I compare Windows CPython 2.5 numbers and Linux CPython 2.5
> numbers, Windows CPython 2.5 is ~1.2 times faster, most likely because
> Jim's laptop is faster. With a single exception. StringMappings test,
> calling .upper() and .lower() methods on string, is 4 times faster on
> Linux. This could be glibc doing smart optimization. I decided to
> exclude this test in comparisons below.

Our ToUpper and ToLower implementations are completely managed, as the
unicode rules for .NET are slightly different than the standard Unicode
ones (Windows unicode string rules predated Unicode).

Since this is managed code, and managed code tends to be slower than C++
code, my guesses are:

	* Mono is not taking something important into consideration.

	  Possible, but doubtful at this point.

	* .NET's implementation lives in C++ and the overhead is 
	  probably due to the managed to unmanaged transition.

	  For example, memset/memcpy are typically faster if written
	  in managed code for blocks of up to 16k bytes or so (I forget
	  the details, but they are in some mailing list).


More information about the Ironpython-users mailing list