Front page | perl.perl5.porters |
Postings from March 2008
Re: faster safe signals?
From:
Tels
Date:
March 21, 2008 05:47
Subject:
Re: faster safe signals?
Message ID:
200803211346.29848@bloodgate.com
Moin,
On Friday 21 March 2008 13:35:37 Nicholas Clark wrote:
> 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?
But if you do not remove the call, just the check, then you have to
replace that check with a check "what op is this", and I am not sure
that will be much faster in the end (spoken like a true armchair code
inspector).
(Okay, calls in C are not as slow as calls in Perl but I'd strive to
eliminate the call anyway. Good for the cache I guess :)
> > Btw, does Perl_runops_standard() ever return non-zero?
>
> I don't know. That did catch my eye. What is the return value *for*?
Don't ask me. Change it to void and see if anything complains? :)
All the best,
Tels
--
Signed on Fri Mar 21 13:43:57 2008 with key 0x93B84C15.
View my photo gallery: http://bloodgate.com/photos
PGP key on http://bloodgate.com/tels.asc or per email.
"Most of the screen on a blog is blank for an imaginary populace of
readers still using 640x480 resolution. I didn't buy a 19" monitor to
have 50% of its screen realestate pissed away on firing white pixels,
you assholes."
-- maddox from xmission