Jarkko Hietaniemi wrote: > Regarding the bug #20218 "perl -d now an order of magnitude slower > 5.6.0 -> 5.8.0" (http://rt.perl.org/rt2/Ticket/Display.html?id=20218) > I now found out that the change #9754 > > [ 9754] By: jhi on 2001/04/19 11:56:07 > Log: Subject: PATCH: Propagate low byte of hints in cop.op_private > From: Robin Houston <robin@kitsite.com> > Date: Wed, 18 Apr 2001 17:58:33 +0100 > Message-ID: <20010418175833.B8976@puffinry.freeserve.co.uk> > Branch: perl > ! ext/B/B/Deparse.pm op.c > > is the one that caused the major speed bump between 5.7.1 and 5.7.2: 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. Hence I suggest that you test the following change, although I don't see why it would work. (note that HINT_BYTE has been renamed (by you) since change #9754) Index: pp_ctl.c =================================================================== --- pp_ctl.c (revision 591) +++ pp_ctl.c (working copy) @@ -1582,7 +1582,7 @@ PP(pp_dbstate) PL_stack_sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp; FREETMPS; - if (PL_op->op_private || SvIV(PL_DBsingle) || SvIV(PL_DBsignal) || SvIV(PL_DBtrace)) + if (PL_op->op_private & HINT_BYTES || SvIV(PL_DBsingle) || SvIV(PL_DBsignal) || SvIV(PL_DBtrace)) { dSP; register CV *cv; End of patch. > 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 ;-) (Another fix is of course to stop storing hints in COP.op_private.)