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

Re: [PATCH] C Callbacks, try #3

Thread Previous | Thread Next
From:
David M. Lloyd
Date:
August 26, 2001 16:24
Subject:
Re: [PATCH] C Callbacks, try #3
Message ID:
Pine.LNX.4.33.0108261815070.818-100000@homebody.freemm.org
On Sat, 25 Aug 2001, Nick Ing-Simmons wrote:

> >So just applying the patch causes a slowdown of about 7%,
>
> We need to explain that.

I'm at a loss.  The only difference is that the body of the 'if' is
longer.

> 7% is a heck of a lot to pay for a feature I am not using! But I am
> surprised it changes that much.
>
> Are PL_sig_pending vs PL_event_pending different classes of variable ?

Nope, they are both ints.  I'm just guessing that gcc can make an 'if
(int) call_function' into a smaller construct than an 'if (int) {
bigger_block; }'.  So the new one isn't slower; the old one is faster. :-)

I'm going to take some time to rethink exactly what problem I'm trying to
solve here... when it comes right down to it, my application doesn't
*need* to hook every single opcode.  I think I will try overloading some
combination of the nextstate opcode, and others like 'sleep' for longer
running things.  We'll 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