loop in python

Gregory Bond gnb at itga.com.au
Tue Aug 23 07:40:51 CEST 2005

km wrote:

> Is python runtime slow at all aspects when compared to perl ? 

And in addition to all that everyone else has said.... most of this is 
startup time.  The python interpreter is a fair bit slower to start up 
(i.e. does much more at startup time) than the perl one:

> lenford$ time python -c "pass"
> real    0m0.298s
> user    0m0.030s
> sys     0m0.030s
> lenford$ time perl -e "0"
> real    0m0.037s
> user    0m0.000s
> sys     0m0.000s

[on a fairly fast Solaris box].  This is mainly because much more of 
python is written in python and needs to be loaded / dynamically linked 
when the process starts up.  On my system, python loads 14 .so files and 
13 .pyc files.  Perl loads 7 .so files.

More information about the Python-list mailing list