how fast is Python?

Steve Lamb grey at despair.dmiyu.org
Fri Aug 29 11:25:27 EDT 2003


On 2003-08-20, dan <danbmil99 at yahoo.com> wrote:
> However, there are definitely cases where a lot of code would need to
> be optimized, and so I ask the question:  How fast is Python, compared
> to say a typical optimizing C/C++ compiler?

    Recently on the debian-user list someone asked why C was as popular
as it was today with so many other languages around.  Many people cited
that C runs faster.  A bunch of Python people (myself included) pointed
out we could develop faster.  Finally someone else asked why a large
program (in this case Evolution) couldn't be written in Python since it
isn't processor intensive.  My answer hit it in one:  "It wouldn't idle
as fast?"

    Except for some rare instances in most cases any program waiting on
user input is going to be sitting idle almost the entire time that it is
running.  Given that is there anyone who really cares how fast it idles?
As others have pointed out for the few cases where the program isn't
idling and the user might have something he's waiting on then clearly
stepping down to C and wrapping that in Python will help.

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------




More information about the Python-list mailing list