summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-14 11:24:34 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-14 11:27:06 -0800
commita00c27eb94c700013d6eb0c27b8faae8b9bc506b (patch)
treef325c83494cca4689d30d5f39a27562fb41d75d4 /sv.c
parentab10b0e54487cf5ebc79f00d7b6dbb47485520a3 (diff)
downloadperl-a00c27eb94c700013d6eb0c27b8faae8b9bc506b.tar.gz
S_glob_assign_ref: Move the sref != dref earlier
The sref != dref check is faster than the GvNAME and HvENAME checks, so put it before them. This will speed up use vars '@ISA' slightly.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 037c0dc960..04e1df13a6 100644
--- a/sv.c
+++ b/sv.c
@@ -3806,11 +3806,11 @@ S_glob_assign_ref(pTHX_ SV *const dstr, SV *const sstr)
}
}
else if (
- stype == SVt_PVAV && strEQ(GvNAME((GV*)dstr), "ISA")
+ stype == SVt_PVAV && sref != dref
+ && strEQ(GvNAME((GV*)dstr), "ISA")
/* The stash may have been detached from the symbol table, so
check its name before doing anything. */
&& GvSTASH(dstr) && HvENAME(GvSTASH(dstr))
- && sref != dref
) {
MAGIC *mg;
MAGIC * const omg = dref && SvSMAGICAL(dref)