summaryrefslogtreecommitdiff
path: root/util.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 /util.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 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 191773017c..636b06d922 100644
--- a/util.c
+++ b/util.c
@@ -2273,7 +2273,7 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode)
PerlProc__exit(1);
}
#endif /* defined OS2 */
- if ((tmpgv = gv_fetchpvs("$", GV_ADD, SVt_PV))) {
+ if ((tmpgv = gv_fetchpvs("$", GV_ADD|GV_NOTQUAL, SVt_PV))) {
SvREADONLY_off(GvSV(tmpgv));
sv_setiv(GvSV(tmpgv), PerlProc_getpid());
SvREADONLY_on(GvSV(tmpgv));