Is python really slow?

Peter Hansen peter at engcorp.com
Wed May 22 08:07:55 EDT 2002


Kragen Sitaker wrote:
> 
> 1. Python is really slow, because it's highly dynamic and because it's
> interpreted.  This is true of Perl, too.  Primitive operations in both
> languages are roughly 100 to 1000 times slower than in languages
> compiled to machine code.  

>From no doubt a very different background, my experience has shown the
number to be more in the range of 10 to 100 times slower, averaging
about 30 times.  In fact, the 100 times was usually with non-Pythonic
code, written with fairly heavy for-loops and lots of strings being
concatenated inefficiently.

(In any case, clearly it is lots slower than C.)

-Peter



More information about the Python-list mailing list