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

Re: [PATCH] Callbacks to core, with benchmarks

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
August 22, 2001 10:43
Subject:
Re: [PATCH] Callbacks to core, with benchmarks
Message ID:
5.1.0.14.0.20010822134024.01e996f0@tuatha.sidhe.org
At 12:05 PM 8/22/2001 -0500, David M. Lloyd wrote:
>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.

Still a lot if that callback check happens every op.

You might want to consider overriding the opcode functions for NEXTSTATE, 
say, to handle callbacks that don't need to be done every op.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


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