develooper Front page | perl.perl5.porters | Postings from January 2003

Re: change #9754: 5 x slowdown for perl -d

From:
Nicholas Clark
Date:
January 19, 2003 15:15
Subject:
Re: change #9754: 5 x slowdown for perl -d
Message ID:
20030119230050.GB291@Bagpuss.unfortu.net
On Sun, Jan 19, 2003 at 10:24:58PM +0100, Rafael Garcia-Suarez wrote:

> For reference, here's the relevant part of the patch :
> 
> ==== //depot/perl/op.c#381 (text) ====
> 
> @@ -3616,7 +3616,7 @@
>  	cop->op_ppaddr = PL_ppaddr[ OP_NEXTSTATE ];
>      }
>      cop->op_flags = flags;
> -    cop->op_private = (PL_hints & HINT_BYTE);
> +    cop->op_private = (PL_hints & HINT_PRIVATE_MASK);
>  #ifdef NATIVE_HINTS
>      cop->op_private |= NATIVE_HINTS;
>  #endif
> 
> The only thing that changes is the value of op_private for COPs.
> This value is then tested in pp_dbstate, which replaces pp_nextstate
> when run under the debugger.

> > Removing the #9754 from the 5.8.0 restores the reasonable -d times
> > (there's still some slowdown introduced between 5.7.2 and 5.7.3 that
> > needs to be found), but (unsurprisingly) breaks the ext/B/t/deparse.t
> > test, the hints are not deparsed correctly.  But the deparse is not
> > the only one: also some of the locale pragma tests start failing.
> 
> Only locale.t ? Something is undertested ;-)

The two things I don't understand

1: The above change seems to relate only to hints. Yet the profiling suggested
   that restore_magic is now called about 23 million times, about 23 million
   more than previously. How does changing hints increase the amount of
   magic?

2: What other things should break without this hints change?
   So what sort of regression tests should we have for them?

> (Another fix is of course to stop storing hints in COP.op_private.)

What effect on program correctness would that have?

Nicholas Clark



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About