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 /doio.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 'doio.c')
-rw-r--r-- | doio.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -734,7 +734,7 @@ Perl_nextargv(pTHX_ register GV *gv) IO * const io = GvIOp(gv); if (!PL_argvoutgv) - PL_argvoutgv = gv_fetchpvs("ARGVOUT",GV_ADD,SVt_PVIO); + PL_argvoutgv = gv_fetchpvs("ARGVOUT", GV_ADD|GV_NOTQUAL, SVt_PVIO); if (io && (IoFLAGS(io) & IOf_ARGV) && (IoFLAGS(io) & IOf_START)) { IoFLAGS(io) &= ~IOf_START; if (PL_inplace) { @@ -767,7 +767,8 @@ Perl_nextargv(pTHX_ register GV *gv) if (PL_inplace) { TAINT_PROPER("inplace open"); if (oldlen == 1 && *PL_oldname == '-') { - setdefout(gv_fetchpvs("STDOUT",GV_ADD,SVt_PVIO)); + setdefout(gv_fetchpvs("STDOUT", GV_ADD|GV_NOTQUAL, + SVt_PVIO)); return IoIFP(GvIOp(gv)); } #ifndef FLEXFILENAMES @@ -934,7 +935,7 @@ Perl_nextargv(pTHX_ register GV *gv) SvREFCNT_dec(oldout); return Nullfp; } - setdefout(gv_fetchpvs("STDOUT",GV_ADD,SVt_PVIO)); + setdefout(gv_fetchpvs("STDOUT", GV_ADD|GV_NOTQUAL, SVt_PVIO)); } return Nullfp; } |