diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-02 12:31:30 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-02 12:31:30 +0000 |
commit | fafc274c285207343d70f4a0d51c29a2f492863a (patch) | |
tree | 29385941f0aac28b61f00fd479320bb32afe923f /pp_sys.c | |
parent | aee92da27d05dcab09a64434715b0fb947860fad (diff) | |
download | perl-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_sys.c')
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1330,7 +1330,7 @@ PP(pp_leavewrite) topname = sv_2mortal(Perl_newSVpvf(aTHX_ "%s_TOP", GvNAME(gv))); topgv = gv_fetchsv(topname, 0, SVt_PVFM); if ((topgv && GvFORM(topgv)) || - !gv_fetchpvs("top", 0, SVt_PVFM)) + !gv_fetchpvs("top", GV_NOTQUAL, SVt_PVFM)) IoTOP_NAME(io) = savesvpv(topname); else IoTOP_NAME(io) = savepvs("top"); @@ -3856,7 +3856,7 @@ PP(pp_fork) if (childpid < 0) RETSETUNDEF; if (!childpid) { - GV * const tmpgv = gv_fetchpvs("$", GV_ADD, SVt_PV); + GV * const tmpgv = gv_fetchpvs("$", GV_ADD|GV_NOTQUAL, SVt_PV); if (tmpgv) { SvREADONLY_off(GvSV(tmpgv)); sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid()); |