develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [PATCH] Callbacks to core, with benchmarks

Thread Previous | Thread Next
From:
David M. Lloyd
Date:
August 22, 2001 10:06
Subject:
Re: [PATCH] Callbacks to core, with benchmarks
Message ID:
Pine.LNX.4.33.0108221202090.1027-100000@homebody.freemm.org
On Wed, 22 Aug 2001, Paul Johnson wrote:

> So that's about 45% overhead for calling an empty function per op.
> If I add a guarded empty function call to a pluggable runops I see
> about 6% overhead.  Inlining the function (ie just the guard) gives
> about 1% overhead.  These are all very rough figures, but you get the
> idea.

On thing to note is that most of this cost is the price for simply having
_a_ callback; once you add more the cost is less.

> Unless this callback overhead can be reduced, I would probably stay
> with a pluggable runops, at least by default, for Devel::Cover, which
> would be a shame.
>
> Of course, the benchmark is not particularly representative, but the
> figures are probably close enough to show a bit of a problem.
>
> Is there any way the speed can be improved when there is a callback?

It's possible.  There's a few things I can adjust that might make things
slightly faster... or slower.  I'll just have to mess around and see.

- D

<dmlloyd@tds.net>


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