develooper Front page | perl.perl5.porters | Postings from March 2008

Re: faster safe signals?

Nicholas Clark
March 21, 2008 05:35
Re: faster safe signals?
Message ID:
On Fri, Mar 21, 2008 at 01:28:20PM +0100, Tels wrote:
> On Friday 21 March 2008 13:21:53 Nicholas Clark wrote:

> > # 3 "PERL_ASYNC_CHECK expands to"
> > if ((my_perl->Isig_pending)) Perl_despatch_signals(my_perl)
> >
> > We do the check after every op. I wondered, if we did the check

> Is this check really that expensive? Or did you mean to eliminate the 
> entire call to Perl_runops_standard() for other than the mentioned 
> places?

No, just that check. It's not expensive in itself, but it is between *every*
op. So removing it a small code saving on every op. IIRC when it was added
it was benchmarked, and measurable. Possibly 1 or 2 percent?

> Btw, does Perl_runops_standard() ever return non-zero?

I don't know. That did catch my eye. What is the return value *for*?

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