Perl code 37 times quickly than Python code??

mykroft gregczajkowski at yahoo.com
Thu Jan 17 02:53:39 EST 2002


Here an idea of what python jit compiler can do (psyco)

computed by Psyco in 0.402314260611 seconds
Python got the same result in 1.72031193909 seconds, Psyco is 4.28
times faster
(and 4.4 when *warm*)

As with all benchmarks, this is a useless number, but shows what
wonders a jit compiler may do for python.

--G 

> Results in a PII 233 Mhz:
> [root at localhost source]# time python array.py
> 5.18user 0.00system 0:05.19elapsed 99%CPU (0avgtext+0avgdata
> 0maxresident)k
> 0inputs+0outputs (253major+153minor)pagefaults 0swaps
> 
> [root at localhost source]# time perl array.pl
> 0.14user 0.00system 0:00.14elapsed 98%CPU (0avgtext+0avgdata
> 0maxresident)k
> 0inputs+0outputs (261major+186minor)pagefaults 0swaps
> 
> I suppose two programs generate same result, is not?. I like Python,
> but Python program execution is 37 times long that Perl program. What
> is WRONG??



More information about the Python-list mailing list