[Mono-dev] IronPython Performance

Andreas Nahr ClassDevelopment at A-SoftTech.com
Sun Apr 23 06:36:52 EDT 2006

Obviously all three might add to that. However I think that number 1 COULD 
already be enough for the noticed slowdown of 3 times. It depends a lot on 
which Classes/ Methods IronPython is using (And I guess it is now optimized 
towards the MS CLR). If you just have pure integer or floating point math in 
simple loops the difference between the CLR and Mono istn't very big (some 
percent usually), but as soon as you use other classes (even from the very 
core of the BCL) you will often see huge differences.
It seems that the current goal of mono is to get everything running (In a 
way as simple as possible) instead of trying to optimize performance (e.g. I 
posted a patch some time ago to improve performance of common string 
operations of up to 100% which was turned down because it would have added 
about 100 LOC). Or another example: if your benchmark writes numbers to 
files or the console the culpit might be NumberFormatter, which itself is 
usually more than 5 times slower than on the CLR. But there are several 
others which could be the cause of that.
By the way: Which optimizations did you enable when running IronPython on 
Mono? These also could potentially make a big speed difference.

Also I guess number 2 could also make some difference in speed.

I am aware of the following issues that might affect the results:
1)  Mono vs. Microsoft's CLR.
2)  Python 2.1 vs. Python 2.4
3)  Changes in IronPython over the last two years. 

More information about the Mono-devel-list mailing list