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 13, 2010 09:53
Subject:
Re: Directions of perl 5 development - requests from companies
Message ID:
20100713165335.GE457@timac.local
On Sun, Jul 11, 2010 at 08:33:29PM +0200, Reini Urban wrote:
> >>
> >> 13% entersub, 10% subtract, 10% leavesub, 10% return, 7% padsv,
> >> 5% aasign, 5% add, 5% subst, 3% nextstate.
> >
> > perl-xxx -e 'sub f{my($n)=@_;$n==8 and bless{1..4}and$a=~s/$/../;$n<2 and return$n;f($n-1)+f($n-2)}f(33)'

> > So, what is the noise level now?
> 
> Great, I'm very happy.

> used ops (main + f) look good:
> $ perl5.13.2-nt -MO=Terse,-exec bench.pl > main.ops
> $ perl5.13.2-nt -MO=Terse,-exec,f bench.pl > f.ops
> $ perl -alne 'print $F[2]' f.ops main.ops|sort |uniq -c|sort -rn
>       7 pushmark
>       7 const
>       6 padsv
>       [...]

That's obviously the number of ops in the execution path and doesn't
indicate how often each kind of op was actually executed.

FYI I got the % figures above using the Activity Monitor utility on a
Mac and clicking on Sample Process once it had started running.
Then collapsing the displayed call trees below the main runloop.
I'm not sure if there's an easy way to do the same on Linux/HP boxes.

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