[IronPython] is the performance gap between C and CPython a decent comparision between the performance gap between C# and IronPython?

Dino Viehland dinov at microsoft.com
Wed Apr 14 18:40:43 CEST 2010

It's certainly true that we both inherit a lot of characteristics from our underlying platform.  For example we get a JIT which we can use to compile Python code whenever we want it and they get a highly optimizing ahead of time compiling which they can use for optimized data structure implementations.  We get GC which gives us good and fast memory management but they need to implement ref counting which lets them play tricks with re-using objects rather than frequently re-allocating.

But I think it's probably too much of a simplification.  Looking at the gaps the difference between CPython and C is huge and so is the difference between IronPython and C# but the differences between CPython and IronPython are mixed.  CPython is much faster on certain things, IronPython is much faster on other things.  In some ways the comparison would imply that you could compare C to C# performance to understand the performance differences of CPython and IronPython and I don't think that would really be of much use.  We both have our own bags of tricks which are built on top of the underlying language.

It's hard to get into technical details with such a broad topic but I'd say all of the DLR features that revolve around one optimization or another show differences from C#.  For example consider the interpreter and the adaptive compiler or even the call site caching which C# has now picked up for its dynamic feature.  And I expect the DLR to continue to grow new features which differentiate it from plain old static C#.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Pablo Dalmazzo
Sent: Wednesday, April 14, 2010 4:52 AM
To: IronPython Mailing list
Subject: [IronPython] is the performance gap between C and CPython a decent comparision between the performance gap between C# and IronPython?

Hi there,

I was replied in one of my topics in StackOverflow that the gap performance between C with cPython  is comparable with the performance gap between with C# with IronPython by some guy I dont know who he is. It could be a newbie, it could not. Now since the base language/platform are very differents my guess is his comparision is way off, but since I hadnt have time to take a look to the IronPython sourcecode at all, even if I want to do it soon, I have no idea if what he says has any sense or not. Now it's a known fact the gap between C and (c)Python is huge, is that a decent comparision of the level of performance difference between C# and IronPython? I think if it's not, someone should reply him with some technical(s) details why not, I was asked if that was true by a programmer friend and she didnt got much confidence in IronPython by reading that

Greetings, Pablo
Con Hotmail no pierdas tiempo. Organizá tus emails en carpetas y encontralos rápido. Conocé cómo<http://www.descubrewindowslive.com/hotmail/organizacion.asp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100414/32a45010/attachment.html>

More information about the Ironpython-users mailing list