[Slightly-OT] Wasn't Google supposed to be "avid Python-Users" ?
peter at engcorp.com
Fri Feb 8 02:18:27 CET 2002
Michael Abbott wrote:
> Well, I think the most enthusiastic supporter of Python has to acknowledge
> that Python has a performance problem when systems are pushed to their
> limits. The fact that Python cannot be effectively compiled to machine
> code (while Java can) makes a substantial difference when it comes down to
> raw machine cycles, and Python's use of memory is not particularly
> I reckon to pay a cost of perhaps a factor of 100 in raw CPU for the
> privilege of using Python.
My rule of thumb, based on informal but extensive measurements over
a year ago, is "between 10 and 100 times slower than C" for simple
problems (i.e. not trying to code up sophisticated dictionaries in
C to compare the performance at that level). Average roughly 30.
This would *not* be the same as saying 100 times slower than Java
by any stretch of the imagination. I believe that comparison would
be closer to "3 times slower".
My theory is also that Python code is much more "optimizable" in
the sense of "potential increase in performance for unit optimization
effort". I can't prove that yet, and it doesn't apply to very
experienced Python developers who might dive for map() and filter()
much sooner than more recent arrivals.
More information about the Python-list