Speed of Python vs. Perl

Skip Montanaro skip at mojam.com
Thu Jan 11 09:09:03 EST 2001


    Tim> Indeed, on my box, I can clearly see the difference between:
    Tim> python -c "print 'hi'"
    Tim> and
    Tim> perl -e "print 'hi'"
    Tim> by eyeball (the former takes a noticeable fraction of a second; the latter
    Tim> appears instantaneous).  

Then you have better reflexes than anyone suspected or you need a better box
(I thought you had a 700+ MHz thingamabob)...  On my box (being similarly
vague), the time command shows no more than 0.04sec user time for the python
command and no more than 0.01sec user time for the perl command (even after
adding a \n to make them truly comparable ;-).

Still, the machine seems to think that Python is slower than Perl at startup
even though I can't tell...

of-course-it-could-be-a-windows-/-linux-thing-jab-jab-ly y'rs,

Skip




More information about the Python-list mailing list