summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-02 12:31:30 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-02 12:31:30 +0000
commitfafc274c285207343d70f4a0d51c29a2f492863a (patch)
tree29385941f0aac28b61f00fd479320bb32afe923f /pp_ctl.c
parentaee92da27d05dcab09a64434715b0fb947860fad (diff)
downloadperl-fafc274c285207343d70f4a0d51c29a2f492863a.tar.gz
gv_fetchpvn_flags ranks highly in the profile, and the ::/' scanning
loop is iterated over millions of times. Add a flag GV_NOTQUAL purely as an optimisation, when the caller is passing in a string that is known not to contain any package separators. p4raw-id: //depot/perl@27053
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 98642e1d28..c8b4870907 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1078,7 +1078,7 @@ PP(pp_flip)
flip = SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv));
}
else {
- GV * const gv = gv_fetchpvs(".", GV_ADD, SVt_PV);
+ GV * const gv = gv_fetchpvs(".", GV_ADD|GV_NOTQUAL, SVt_PV);
if (gv && GvSV(gv))
flip = SvIV(sv) == SvIV(GvSV(gv));
}
@@ -1172,7 +1172,7 @@ PP(pp_flop)
flop = SvIV(sv) == (IV)IoLINES(GvIOp(PL_last_in_gv));
}
else {
- GV * const gv = gv_fetchpvs(".", GV_ADD, SVt_PV);
+ GV * const gv = gv_fetchpvs(".", GV_ADD|GV_NOTQUAL, SVt_PV);
if (gv && GvSV(gv)) flop = SvIV(sv) == SvIV(GvSV(gv));
}
}