Super-Fast Python Implementation for .NET and Mono
Lansdowne writes "Jim Hugunin, the creator of Jython, has released an incredibly fast implementation of Python for Microsoft .NET and Mono called IronPython. Here's his PyCON 2004 presentation, including some benchmarks. He concludes: 'Python is an extremely dynamic language and this offers compelling evidence that other dynamic languages should be able to run well on this platform.'"
I'm glad to see more alternative languages for the .NET/Mono platform... If we're gonna get stuck with it, we may as well make the best of it! :) Seeing Python run nice and fast, being a dynamic language and on a VM, is great stuff too.
Maybe he could have gotten in on the Great Parrot/Python Pie-a-Thon. Perhaps an opportunity to plaster both Guido and Dan with a cream pie...
Get off my lawn.
But Python really hold a candle to PHP or Perl. A language without dollar signs is a day without sunshine.
Sorry to break it to you.
I usually take "released" to mean there is an implementation that is publicly available. Unless I am somehow just missing it, it doesn't seem to have been released yet...
Is there anything the MONO team can do to improve support for dynamic languages?
.NET 2.0 comes out.
.NET, once an Assembly is loaded into memory, it stays there until the AppDomain quits.
Mono, today, actually would support dynamic languages better than Microsoft's framework, since they implement the DynamicMethod class, which Microsoft fully documents in their Longhorn SDK documentation, but won't actually be released until
The DynamicMethod class allows you to load a method into memory for JITting and execution, and preserves the ability for you to unload that code from memory, which you can't do with full-fledged Assemblies, even those generated via Reflection.Emit -- in
NO CARRIER
Is is "IronPython," the way we'd usually pronounce it, or do we put a little Rocky Balboa in it and call it the "I- ron Py- thon ?"
Those Lispy features are a powerful addition, which make it easier for a programmer to get their job done. If you would rather trade those features for performance, consider Fortran instead. It would be more useful if, rather than focus on the leverage of a single-platform solution, the implementors can approach the performance of various Common Lisp implementations. It is true that dynamic languages don't have to be slow; neither do they have to rely on Microsoft's runtime.
* Fast - IronPython-0.2 is 1.4x faster than Python-2.3 on the standard pystone benchmark.
I don't know about pystone in particular, but Psyco (a dynamic compiler module that essentially replaces the Python interpreter's inner loop at runtime) tends to make code run much faster than that and can speed up algorithmic code tenfold or more.
When running with Psyco, quicksort written in Python is actually faster than Python's built-in C mergesort!
I remember some previous attempt to do Python under .NET that was painfully slow & eventually written off as a failure and blamed on .NET's inability to handle the level of dynamism required to implement Python. What's changed since then?
Are we looking at some sort of fundamental breakthrough in working with the CLR here or was the problem simply tackled by a more experienced/insightful developer?
my sig's at the bottom of the page.
In C, a "variable" is a box that contains things. The box is designed to only hold one kind of thing, so an "int" box can't hold a "char *".
In Python, a "variable" is just a "post-it note" that can be stuck onto a value. The post-it note "a" can be stuck on to anything:Nevertheless, Python is a strongly-typed language; this will raise an error:(If you're on a Unix system, you most likely have Python installed. Type "python" on the command line and try typing that in.)
Objects with different types are allowed to be equal, though there is some obvious danger with that. Here's a pathological case:This is bad, bad code in real life, but it proves the point.