Is a "real" C-Python possible?

Chris Mellon arkanes at gmail.com
Tue Dec 11 14:47:15 EST 2007


On Dec 11, 2007 1:25 PM, John Nagle <nagle at animats.com> wrote:
> sturlamolden wrote:
> > On 10 Des, 23:49, a... at pythoncraft.com (Aahz) wrote:
> >
> >> "Premature optimization is the root of all evil in programming."
> >> --C.A.R. Hoare (often misattributed to Knuth, who was himself quoting
> >> Hoare)
>
>     We're ten years into Python, and it's still a naive interpreter.

This is an absurd misrepresentation of the state of the Python VM.

> It's time for a serious optimizing compiler.  Shed Skin is going
> in the right direction.  But for some reason, people seem to dislike the
> Shed Skin effort. Its author writes "Am I the only one seeing the potential
> of an implicitly statically typed Python-likea-lnguage that runs at
> practically the same speed as C++?"
>
>     "For a set of 27 non-trivial test programs (at about 7,000 lines in total;
> ... measurements show a typical speedup of 2-40 times over Psyco, about 10 on
> average, and 2-220 times over CPython, about 35 on average."  So that's
> what's possible.
>

... with roughly a hundredth of the python standard library, and a
bunch of standard python features not even possible. I like
generators, thanks.

If shedskin can actually match Pythons feature set and provide the
performance it aspires to, thats great, and I may even start using it
then. But in the meantime, hardly anything I write is CPU bound and
when it is I can easily optimize using other mechanisms. Shedskin
doesn't give me anything that's worth my time to improve on it, or the
restrictions it places on my code. I think JIT is the future of
optimization anyway.

>     I'm surprised that Google management isn't pushing Guido towards
> doing something about the performance problem.
>

Assuming your conclusion (ie, that there's a performance problem to do
something about) doesn't prove your case.



More information about the Python-list mailing list