Re: Tcl/Lisp/Python: A "User" point of view
Tim Bunce (Tim.Bunce@ig.co.uk)
Fri, 30 Sep 1994 11:06:39 +0000
In article <Cww0DA.I68@cwi.nl> guido@cwi.nl (Guido van Rossum) writes:
>mdimeo@brooktree.com (Matt DiMeo) writes:
>[...]
>
>Since this was cross-posted to comnp.lang.python, here are the results
>of comparing Perl and Python. I print the Perl numbers too since the
>CPU was unspecified.
>
> & time perl tst.pl
>
> real 5.94
> user 5.74
> sys 0.09
>
> & time python tst.py
>
> real 1.35
> user 1.12
> sys 0.08
>
> & cat tst.py
> l = []
> for i in range(10000):
> l.append(i)
>
> & cat tst.pl
> for ($i = 0 ; $i < 10000 ; $i++) {
> unshift(@f, $i) ;
> }
>
> &
>
>Should I say more?
>
Yes! You're not testing like-with-like.
Please repost this using push instead of unshift.
My perl 5 gives:
real 0.5
user 0.3
sys 0.1
but that's not fair because I don't have a python on this machine to
compare it with.
>--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
><http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>
Regards,
Tim Bunce.