<$BlogRSDUrl$>

Sunday, March 28, 2004

IronPython: A fast Python implementation for .NET and Mono 

Jim Hugunin
The Importance of Performance Previous attempts to implement Python and other highly dynamic languages for the CLR have resulted in systems with extremely poor performance. Performance so bad that they were considered unusable.

"The speed of the current system is so low as to render the current implementation useless for anything beyond demonstration purposes.“ – ActiveState’s report on Python for .NET

"The CLI is, by design, not friendly to dynamic languages. Prototypes were built, but ran way too slowly."– InfoWorld, Aug. 2003

There are many other such anecdotal remarks on the web claiming that the CLR is a poor platform for dynamic languages. These results were surprising to me. The CLR is supposed to be a superset of the functionality in a JVM. The JVM can host a number of dynamic languages with very good performance. Jython stands as the clearest proof of this with performance close to the native C implementation of Python (CPython). I wanted to pinpoint the fatal flaw in the design of the CLR that made it so bad at implementing dynamic languages. My plan was to write a short pithy article called, "Why .NET is a terrible platform for dynamic languages".

Unfortunately, as I carried out my experiments I found the CLR to be a surprisingly good target for dynamic languages, or at least for the highly dynamic specific case of Python. This was unfortunate because it meant that instead of writing a short pithy paper I had to build a full Python implementation for this new platform to see if there would be any hidden traps along the way. Because performance is such a dominant question for Python on the CLR, the rest of this paper focuses entirely on performance issues and measurements.


Comments: Post a Comment

This page is powered by Blogger. Isn't yours?