Python 2 times slower than Perl

Roman Suzi rnd at onego.ru
Thu Jul 19 05:37:26 EDT 2001


On Thu, 19 Jul 2001, Greg Jorgensen wrote:

> "Alex Martelli" <aleaxit at yahoo.com> wrote in message
> news:9j4af20d2o at enews4.newsguy.com...
> 
> > Perl and Python ruled the roost in Prechelt's tests (from the POV
> > of development speed), indistinguishable from each other.  C and C++
> > made the fastest executables on average.  Java was bad on both
> > scores -- very slow programs taking a long time to develop.  Other
> > scripting languages (Tcl, Rexx) gave intermediate development times
> > but extremely slow results.  Somebody else claims to have rerun the
> > same experiment with Common Lisp, getting runtimes competitive with
> > C and C++ and development speed competitive with Perl and Python.
> >
> > We could definitely do with more such tests...!!!
> 
> With all respect, why? Other than Usenet fodder what good are these tests?

Posting tests showing performance weakness in some typical situations
is needed to make Python better.

Maybe, not such trivial and useless as with cycling 2.5 * 2.5, but others
which come from real programmer's practice.

For example, Oleg Broytman was concerned with Python's re 
performance, because their application became 5 time slower.

We need watch Python performance and it is not nice to discourage posting
tests here which indicate problams.

> I know who the audience is for these timing tests: In the cubicle next to
> mine is a junior programmer (fresh from Sun Java training classes, his first
> language) who frequently gets into long discussions with other programmers
> about language trivia and "performance." His projects are always late
> because he over-designs and ends up with unusable class structures. Over the
> course of the last few months he has wasted hundreds of hours of his own
> time, and incessantly interrupted other people, because he doesn't
> understand Excel or SQL. He's writing a set of functions--he calls it a
> class library--to calculate vacation time for various types of employees.
> His code is supposed to replace a perfectly good spreadsheet that everyone
> understands.

I do not know your concrete case, but sometimes simple CGI script is
better than XLS file, because only browser is needed to use it. It's much
more inconvenient to send XLS to anybody.

SQL is also overkill when not used on the regular basis with 
real databases.

And also those "wasted hundreds of hours" are not wasted in vein,
because juniors need to learn.

As for over-designs, I agree. I am too tending to over-design (I am not
into XP!). This could be explained by inexperience. When experienced
programmer makes the same, it is not called "over-design", because he
includes things which make easier to extend system in directions he
foresee.

For example, when I was writing my ISP tarification program, I always
tried to put our domain name in a variable (while it was easier to put
"onego.ru" everywhere is source!). Now we can accept different domains
without much refactoring. 

> Sign me, cynical and sick of worthless benchmarks.

These benchmarks also show how good someones Python is compiled. For
exaple, I saw that my AMD K6 225 makes almost same results as somebody
elses Celeron 450 ;-)
 
> Greg Jorgensen
> PDXperts LLC
> Portland, Oregon, USA

Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
 





More information about the Python-list mailing list