develooper Front page | perl.perl5.porters | Postings from July 2010

Re: Directions of perl 5 development - requests from companies

Thread Previous | Thread Next
From:
Tim Bunce
Date:
July 8, 2010 15:04
Subject:
Re: Directions of perl 5 development - requests from companies
Message ID:
20100708220343.GN457@timac.local
On Thu, Jul 08, 2010 at 03:11:27PM +0200, H.Merijn Brand wrote:
> On Wed, 7 Jul 2010 16:23:45 +0200, Reini Urban <rurban@x-ray.at> wrote:
> 
> > But I get a lot of benchmarks and feedback from the real-world, which I
> > try to analyse.
> > 5.6 is still the fastest by far, all non-threaded of course, then 5.8.9,
> > then 5.10, then 5.12. But some newer modules don't work with these
> > old modules anymore.
> 
> Better example needed, as this seems to fall within the noise ...

Very much so. I think the 'real work' needs to far outweigh (>x10) the
startup costs before there's any real value in the results.

> perl-xxx -we'$a="x" x 2000000;$_=index$a."zz".$a,"azz"'
> perl-xxx -we'$a="x" x 2000000;($a."zz".$a)=~/azz/'

Adding a " for 1..100" to the end of those would help.

I think many people consider the cost of sub/method calls a significant
issue. Here's a little bit of code that exercises sub calls with args,
recursion, object creation/destruction, and hash creation. It runs on
all perl versions and can easily be tuned to suit the cpu performance:

$ time perl -e 'sub f { my($n)=@_; my $h=bless { 1..10 }; return $n if $n < 2; f($n-1)+f($n-2) } f(25)'

I'd be very interested to see the results of that across those perl versions.

Tim.

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