Dan Sugalski <[EMAIL PROTECTED]> writes:
>At 04:01 PM 1/6/01 +0000, Simon Cozens wrote:
>>On Sat, Jan 06, 2001 at 10:59:04AM -0500, Dan Sugalski wrote:
>> > >Which is exactly what Chip did in his safe-signals patch. 33% slowdown.
>> > I think you misremember that number. IIRC it was somewhere between 3%-5%.
>>
>>Gosh, really? I thought it was so significant that it didn't go in core.
>>If it was that small, why *didn't* it go in core?
>
>Because a guaranteed 3-5% slowdown in the interpreter, regardless of 
>whether you use signals or not (and the vast majority of perl code that 
>runs doesn't) *is* significant. The cost just wasn't worth the benefit.

I just spliced 

   if (!PL_regcompp) {
      Perl_warn(aTHX_ "Odd");
   }

into Perl_runops_standard().

i.e. a test of a per-thread var which compiler cannot expect to second guess.

No warns occurred running the test suite.

I cannot measure any difference in time it takes to run "make test".
With/without (and for that matter with Perl_runops_debug()) I get 
CPU time of 36.7 sec +/- about 0.5 sec. (900MHz AMD, SuSE Linux6.4)

So I think the 3-5% is over estimate.

(Turning on -DDEBUGGING adds about 1 sec to that - so DEBUGGING costs 3%)

-- 
Nick Ing-Simmons

Reply via email to