develooper Front page | perl.fwp | Postings from November 2001

Re: Feel good benchmarks

Thread Previous | Thread Next
From:
mallum
Date:
November 20, 2001 05:21
Subject:
Re: Feel good benchmarks
Message ID:
20011120125711.A540@10.am

on Tue, Nov 20, 2001 at 01:53:40PM +0200, Vladi Belperchinov-Shabanski wrote:
> 
>   it was really interesting for me how performance changed
>   between perl versions and other languages (interpreters/
>   scripts/etc.) but C points just nothing (actually result
>   is quite obvious:))...
> 

heres the script in python ( 2.1 ) ;

def f(num):
    if num <= 1: return num
    return f(num-1) + f(num-2)

print f(25)

which gives;

real    0m0.738s
user    0m0.710s
sys     0m0.030s

compared to 

real    0m1.031s
user    0m1.030s
sys     0m0.000s

for the perl ( 5.6.1 debian woody ) on my system.

I didn't expect that.

  -- mallum 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About