python speed

Peter Hansen peter at engcorp.com
Wed Nov 30 13:22:34 EST 2005


David Rasmussen wrote:
> Frithiof Andreas Jensen wrote:
>>From the speed requirement: Is that correspondance chess by any chance??
> 
> Regular chess at tournament time controls requires speed too. Any pure 
> Python chess program would lose badly to the best C/C++ programs out 
> there now.
> 
> I would also like to see Half Life 2 in pure Python.

True, but so what?  Why did you suddenly change the discussion to 
require "pure" Python?  And please define "pure" Python, given that the 
interpreter and many builtins, not to mention many widely used extension 
modules, are coded in C?  And are you not allowed to use any of the 
performance-boosting techniques available for Python, like Pyrex or 
Psyco?  Why such restrictions, when these are things Python programs use 
on a daily basis: these are *part* of Python, as much as the -O switch 
on the compiler is part of C/C++.

Okay, let's compare a "pure" Python program (if you can define it in any 
meaningful, practical way) with a "pure" Java program, running on a 
non-JIT interpreter and with optimizations turned off (because, of 
course, those optimizations are umm... somehow.. not "pure"...?).

Judging by the other posts in this thread, the gauntlet is down: Python 
is faster than Java.  Let those who believe otherwise prove their point 
with facts, and without artificially handcuffing their opponents with 
non-real-world "purity" requirements.

-Peter




More information about the Python-list mailing list