diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-25 00:39:30 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-25 00:39:30 +0000 |
commit | f7877b281b40407827939f44ea94226de573cdbc (patch) | |
tree | a9a5cac49427908841ae0bf5a3af524fee855e6a /dump.c | |
parent | fb4fc1faf0cb0e6b2bec4f31ddbca2817f387a6e (diff) | |
download | perl-f7877b281b40407827939f44ea94226de573cdbc.tar.gz |
Store GvGP in the SV head union. For all the common lookups [eg GvCV()]
this avoids 1 pointer dereference and the associated risk of a CPU
cache miss. Although this patch looks deceptively small, I fear its
CBV(*) might be rather high.
(* Crack By Volume)
p4raw-id: //depot/perl@27323
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1322,7 +1322,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo SvREFCNT_dec(d); return; } - if (type <= SVt_PVLV) { + if (type <= SVt_PVLV && !isGV_with_GP(sv)) { if (SvPVX_const(sv)) { Perl_dump_indent(aTHX_ level, file," PV = 0x%"UVxf" ", PTR2UV(SvPVX_const(sv))); if (SvOOK(sv)) @@ -1550,6 +1550,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", GvNAME(sv)); Perl_dump_indent(aTHX_ level, file, " NAMELEN = %"IVdf"\n", (IV)GvNAMELEN(sv)); do_hv_dump (level, file, " GvSTASH", GvSTASH(sv)); + if (!isGV_with_GP(sv)) + break; Perl_dump_indent(aTHX_ level, file, " GP = 0x%"UVxf"\n", PTR2UV(GvGP(sv))); if (!GvGP(sv)) break; |