From: Rafael Garcia-Suarez Date: Tue, 27 Sep 2005 09:18:42 +0000 (+0000) Subject: Micro-optimisation: use PL_globalstash instead of looking up X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d6a985f2bb09f0fd197b7c4af4b2d8913ce7f573;p=p5sagit%2Fp5-mst-13.2.git Micro-optimisation: use PL_globalstash instead of looking up CORE::GLOBAL::require by name p4raw-id: //depot/perl@25615 --- diff --git a/op.c b/op.c index fa6723f..275e9fd 100644 --- a/op.c +++ b/op.c @@ -5958,8 +5958,10 @@ Perl_ck_require(pTHX_ OP *o) if (!(o->op_flags & OPf_SPECIAL)) { /* Wasn't written as CORE::require */ /* handle override, if any */ gv = gv_fetchpv("require", FALSE, SVt_PVCV); - if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) - gv = gv_fetchpv("CORE::GLOBAL::require", FALSE, SVt_PVCV); + if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) { + GV **gvp = (GV**)hv_fetch(PL_globalstash, "require", 7, FALSE); + if (gvp) gv = *gvp; else gv = Nullgv; + } } if (gv && GvCVu(gv) && GvIMPORTED_CV(gv)) {