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

Re: [PATCH] Callbacks to core, with benchmarks

Thread Previous | Thread Next
Dan Sugalski
August 22, 2001 10:43
Re: [PATCH] Callbacks to core, with benchmarks
Message ID:
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.


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                      teddy bears get drunk

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About