IronPython

September 6, 2006

IronPython 1.0 is an implementation of Python on Microsoft’s .NET CLR. The author claims that IronPython runs faster than CPython, thus disputing the earlier work done by many dynamic languages on the CLR. I happen to be one of those early implementors who claimed the CLR was slow. It all depends on what your goals are. CPython is a slow interpreter for Python; therefore, it’s easy to beat with a better implementation on the CLR (or any compiler). My implementation also ran much faster than any interpreted implementation, but who cares? The rest of us were comparing our advanced languages against high-performance native code implementations (Lisp, Scheme, Smalltalk, Mercury, Oz, etc). Our implementations even ran slower than benchmarks written in C#, which is a better comparison.  The reason is that dynamic execution hits the slow paths on the CLR, which is optimized for strongly-typed OO code. The question for me became: how much performance am I willing to sacrifice to get access to the .NET libraries? Is my language so much better than C# that I’m willing to take a significant hit in performance and compatibility (CLS doesn’t support advanced languages)? For me the answer to both is “not much” and “not really”, especially compared to C# 3.0. My point is that IronPython doesn’t prove that the CLR is suitable for dynamic languages. It only proves that compiled programs run faster than interpreted ones, which we already knew.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: