Is a "real" C-Python possible?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Tue Dec 11 15:35:28 EST 2007


On Tue, 11 Dec 2007 11:25:32 -0800, John Nagle 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.
> 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-like-language 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.
> 
>     I'm surprised that Google management isn't pushing Guido towards
> doing something about the performance problem.

Maybe because it isn't as much a problem as people with C envy assume it 
must be? (Disclaimer: I'm not suggesting that John is one of those 
people.)

Not that I'd object to anyone else doing the work to speed up Python, but 
for the things I use Python for, I've never felt the need to say "Gosh 
darn it, my script took twelve milliseconds to run, that's just too 
slow!!!". Maybe Google are in the same boat?

Actually, in Google's case, I guess their bottleneck is not Python, but 
trying to push around gigabytes of data. That will be slow no matter what 
language you write in.



-- 
Steven.



More information about the Python-list mailing list