Original Post
Initial attempts[1] by Mark Hammond(who was working for ActiveState at the time) to create a Python implementation for the .NET platform didn''t prove to be very successful. His conclusion was that
"The speed of the current system is so low as to render the current implementation useless for anything beyond demonstration purposes."Since that time, .NET has gotten a reputation[2] for being a bad target for dynamic languages. Jim Hugunin, the author of, among other things, JPython and NumPy, delivered a paper at PYCON 2004 on his Python implementation for the .NET platform, called IronPython. The PyStone benchmarks shows that IronPython is on average 1.4 times faster than CPython. Obviously, it was slower than CPython at some things; the "eval" function in particular(which is also pretty slow in JPython). The feature list is impressive:
- Fast - IronPython-0.2 is 1.4x faster than Python-2.3 on the standard pystone benchmark. More details about performance are contained in this paper for PyCon 2004.
- Integrated with the Common Language Runtime - IronPython code can easily use CLR libraries and Python classes can extend CLR classes.
- Fully dynamic - IronPython supports an interactive interpreter and transparent on-the-fly compilation of source files just like standard Python.
- Optionally static - IronPython also supports static compilation of Python code to produce static executables (.exe''s) that can be run directly or static libraries (.dll''s) that can be called from other CLR languages including C#, VB, managed C++ and many more.
- Managed and verifiable - IronPython generates verifiable assemblies with no dependencies on native libraries that can run in environments which require verifiable managed code.
"IronPython can run fast on .NET and presumably on any decent implementation of the CLR. Python is an extremely dynamic language and this offers compelling evidence that other dynamic languages should be able to run well on this platform. However, implementing a dynamic language for the CLR is not a simple process. The CLR is primarily designed to support statically typed OO and procedural languages. Allowing a dynamic language to run well on this platform requires careful performance tuning and judicious use of the underlying CLR constructs."Unfortunately, there doesn''t seem to be any code or information available beyond the IronPython[3] site and the transcript[4] of the PYCON talk. But I for one am looking forward to playing with this as soon as an implementation is available. How about you? [1] http://www.activestate.com/Corporate/Initiatives/NET/Research.html [2] http://www.infoworld.com/article/03/08/22/33OPstrategic_1.html [3] http://ironpython.com [4] http://www.python.org/pycon/dc2004/papers/9/IronPython_PyCon2004.html -- AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system. [Project site] [Blog] [RSS] [Browse the source] [IRC channel]
