Super-Fast Python Implementation for .NET and Mono 54
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.'"
cool stuff (Score:5, Interesting)
Re:cool stuff (Score:3, Interesting)
(There's a language I'd like to see on more platforms.)
Re:cool stuff (Score:1)
This is obviously some new meaning of the word with which I was previously unfamiliar.
Re:stuck? (Score:2)
The real lesson of this "superfast Python" is not that dotnet is a fast platform; it's the more prosaic observation that regular Python still has a great
Lisp (was Re:stuck?) (Score:3, Informative)
Re:Lisp (was Re:stuck?) (Score:2)
The problem is rather that C (the natural contender) allows a non-experienced user to screw up really badly. Anyway, in one
Re:Lisp (was Re:stuck?) (Score:1)
Re:stuck? (Score:3, Interesting)
Re:stuck? (Score:2)
Re:stuck? (Score:2)
Most Free Software platforms have Gcc on them already. Gcc could be part of the runtime, in place of some anonymous JITter.
Re:stuck? (Score:3, Insightful)
What most people do not understand is that for the vast majority of business apps the
Re:stuck? (Score:2)
If you're willing to give up the dynamic nature and instead settle for scheme-y features, it could run a whole lot faster.
jython and gcj? (Score:2)
Maybe gcj would be a better place to start. Or, for that matter, maybe you could try to get jython compiled with gcj; sounds like it's been done before.
Vaporware (Score:2)
Re:Vaporware (Score:2)
It does exist, it is just not Open Source (at least yet).
Re:Vaporware (Score:1)
Re:cool stuff (Score:2)
Re:cool stuff (Score:1)
http://www.samba.org [samba.org] 'nuff said.
Perhaps he should have waited... (Score:4, Funny)
Well, that's great and all (Score:3, Funny)
Sorry to break it to you.
Re:Well, that's great and all (Score:2, Informative)
Re:Well, that's great and all (Score:1, Troll)
Next Question (Score:3, Interesting)
Though this would probably break their binary compatibility with MS's implementation.
Re:Next Question (Score:5, Informative)
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
Re:Next Question (Score:1)
Re:Next Question (Score:2)
Re:Next Question (Score:2)
Which is incredibly slow and limited, since you can only pass data between AppDomains if the data is serializable, which means no passing filehandles, sockets, API handles, or the like -- and then you encounter the overhead of having to serialize/deserialize it, which is considerable.
not released (Score:5, Insightful)
Re:not released (Score:4, Informative)
Compiled Python (Score:2)
Re:Compiled Python (Score:5, Informative)
Re:Compiled Python (Score:2)
What I want to know is... (Score:4, Funny)
Great News (Score:2)
I'd suspect, though, that a Parrot implementation, as Parrot continues to develop, will prove to be faster, since it was designed with more dynamic languages in mind.
Psyco (Score:4, Informative)
I don't know about pystone in particular, but Psyco [sf.net] (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 [python.org]!
Re:Psyco (Score:2)
You got that comparison wrong; mergesort is algorithmically faster than quicksort. Mergesort operates in O(n log(n)) time for any input whereas quicksort generally operates in O(n log(n)) but jumps to O(n^2) in the worst case. Quicksort is the most widely used sort algorithm because it uses less overhead which makes it faster in practice.
Re:Psyco (Score:3, Informative)
"Faster" is the wrong word. Mergesort has a lower order of complexity, which means it scales better in suboptimal situations.
Remember, O(n^2) will always be "faster" than O(m) where n sqrt(m); the complexity of an algorithm is about scalability, not speed.
Re:Psyco (Score:2)
Re:Psyco (Score:1)
Re:Dynamic? (Score:2, Interesting)
a = 1
Now a is an integer (actually what happens is this: an integer object is created, with the value 1, and the name a is bound to it)
a == '1'
Returns False: objects with different types can not be equal.
a = '1'
A new object is created, containing the string '1'. a now binds to that new object.
a == '1'
True.
Somewhat more useful: file objects implement a num
Re:Dynamic? (Score:4, Interesting)
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.
Re:Dynamic? (Score:1)
Besides dynamic typing which has already been discussed above, "dynamic" languages often offer additional features that qualify them as dynamic, such as creating classes at runtime (e.g. prototype-based, as in javascript).
Still, you are right. The term is used in a nebulous manner. A possible "definition" is:
Re:Dynamic? (Score:2)
Yes. Dynamic means that a lot of things are deferred to runtime as opposed to compile-time (static).
For example, some languages like python use dynamic typing :
a = 'hello'
a = 1
def foo(a): # we don't know what type a is -- deferred till runtime
print a
Some languages like C++ have dynamic binding (e.g. virtual functions).
Some languages allow dynamic loading. That is, you can load libraries at runtime and query those libraries. While nearly every language
What changed? (Score:5, Interesting)
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?
Re:What changed? (Score:2, Informative)
Why is IronPython Fast?
High system performance is the end result of hundreds of small decisions rather than a single large one. Much of IronPython's performance comes from careful consideration of performance in each design choice. I've found that profilers are generally useless for improving the performance of serious applications and that the only good route involves trying a variety of different implementation strategies and comparing their performance in both micro and macro benchmarks. That sai
Incredibly fast? (Score:3, Insightful)
Platform (Score:3, Interesting)
Re:Platform (Score:1)