Python 2 times slower than Perl

Ken Seehof kseehof at neuralintegrator.com
Fri Aug 3 02:07:32 CEST 2001


According to http://www.bagley.org/~doug/shootout/:

Actually python averages somewhere around 10% slower than perl.
(sometimes more, sometimes less, sometimes python wins)
But python uses about 10% less memory.
(sometimes more, sometimes less, sometimes perl wins)

Neither of these perturbations are significant considerations IMO.

Anyway, benchmarks exagerate.  In real application most time in either
language is spent inside library calls.  When you factor that in, I'd bet
the difference in overall performance between python and perl would
be negligible or would have to be explained by a difference in quality
of the extension libraries, not the interpreters.

- Ken Seehof
kseehof at neuralintegrator.com
www.neuralintegrator.com/kseehof

----- Original Message ----- 
From: "Mark Nenadov" <mnenadov at stclairc.on.ca>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Thursday, August 02, 2001 12:59 PM
Subject: Re: Python 2 times slower than Perl


> In article <ku7kx7gtzk.fsf at lasipalatsi.fi>, "Erno Kuusela"
> <erno-news at erno.iki.fi> wrote:
> 
> > Can anybody explain why Python is always about 1 time | slower than
> > Perl?
> > it is not - sometimes it is slower and sometimes faster.
> >   -- erno
> 
> It doesn't really matter anyways. A developer's time is usually more
> costly (except in certain situations). Python code is much easier to
> maintain. 
> 
> Think about it this way: structured/procedural programming is much faster
> than using objects. Why don't we all go back to the old way? There are
> tradeoffs to developing reusable and easy to maintain software. Sometimes
> you gotta sacrifice on the execution speed. 
> 
> -- 
> "Son, is that spagetti on your screen, or is it just Perl code?" - Anon.
> 
> ~Mark Nenadov (author/editor for http://www.coffeecode.com)
> -- 
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list