A
Alex Martelli
John Nagle said:Tamarind is inside the current implementation of Flash, but it's
not into Firefox yet, apparently. The current SpiderMonkey implementation
is nothing to get excited about in terms of performance.
If CPython is *unreasonably slow*, and SpiderMonkey is somewhere between
5 times slower (when CPython is totally handicapped to only using
primitives that are also made avaiable by SpiderMonkey) and 15 times
slower (as soon as CPython can use slightly better primitives, without
any special striving for optimization), then it should logically follow
that the current performance of SpiderMonkey is WELL worth (negative)
"excitement" on your part -- what's 15 times worse than "unreasonably
slow"?!
Can you run a generic benchmark "inside the current implementation of
Flash" to check out its Javascript performance? I can't, so, not having
any way to verify any claims regarding its performance, I'm going to
consider those claims not proven until further notice (verification by
somebody I know and trust personally).
My point is that there are optimizing hard-code compiler
implementations of many dynamic languages, including LISP, Self, and
Smalltalk, but not Python.
If you had not mentioned Javascript specifically, I would not have
entered this thread, and indeed I consider your assertion which you now
(carefully avoiding mention of Javascript claim is "your point", a
somewhat boring and trite restatement of well-known fact -- it's
obviously _possible_ to build excellent "compilers to machine code" for
dynamic languages, with sufficient effort fueled by either commercial or
academic pursuits, as has been repeatedly proven for Scheme, Lisp,
Smalltalk, etc, etc; and it does indeed seem that no academic or
commercial entity has as yet released such a compiler for Python (though
the pypy project may move in such a direction in the future, it does not
appear to be part of what they have released as part of their 1.0
milestone).
But I consider your specific claim about Javascript to be currently
unfounded -- maybe a year from now they'll indeed release to the public
a version that runs, say, 30 times faster than today's (it would have to
be at least twice as fast as CPython to justify your "unreasonably slow"
claim, right?)... but, even if you trust them blindly to do so, how do
you know in advance what the performance of the implementation of Python
with the ability to generate the fastest machine code will be a year
from now?!
Alex