Towards faster Python implementations - theory

Tim Golden mail at timgolden.me.uk
Thu May 10 10:02:20 EDT 2007


sturlamolden wrote:
> On May 8, 5:53 pm, John Nagle <n... at animats.com> wrote:
> 
>>     The point here is that we don't need language changes or declarations
>> to make Python much faster.  All we need are a few restrictions that
>> insure that, when you're doing something unusual, the compiler can
>> tell.
> 
> Franz, CMUCL, SBCL and GCL teams made Lisp almost as fast as C. A
> dynamic language can be fast if the implementation is good.
> 
> If you look at SBCL and GCL, no code is interpreted. It's all compiled
> on the fly to native machine code. The compiler begins with some code
> and some input data, and compiles as much as it can. Then the RT
> executes the machine code, compiles again, etc. Often long stretches
> of code can be compiled without break, and tight performance critical
> loops are usually compiled only once. In addition to this, one needs
> an efficient system to cache compiled code, in order to do the
> compilation work only once. making a dynamic language fast is not
> rocket science.
> 
> We should have somthing like "GPython", a Python RT on top of a GCC
> backend, similar to what the GCL team did for Lisp. There is no
> obvious reason as to why Lisp should have better performance than
> Python.

I doubt if anyone disputes the gist of what you're
saying[*], viz that Python could be made faster by using
technique (a), (b) or (c) which have been successful 
elsewhere. At least that it's worth investgating.

But the relevant bit of your last paragraph is at the start:
"We should...". Unless someone or someones has the time,
inclination, money, backing, wherewithal etc. to implement
this or any other measure of speeding-up, it's all
pie-in-the-sky. Useful, maybe, as discussion of what
options are viable, but a project of this magnitude
doesn't just happen in some developer's lunchbreak.

Many people (and I include myself) are quite
happy with Python's speed. In fact, I'm quite happy
with most things about Python. Others would like to
see it faster. That's great. But unless people
puts their money where their mouths are, I don't
see it happening.

TJG

[*] Actually, knowing this community, I'm sure *someone's*
going to!



More information about the Python-list mailing list