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 /pp_hot.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 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1611,6 +1611,9 @@ Perl_do_readline(pTHX) sv = TARG; if (SvROK(sv)) sv_unref(sv); + else if (isGV_with_GP(sv)) { + SvPV_force_nolen(sv); + } SvUPGRADE(sv, SVt_PV); tmplen = SvLEN(sv); /* remember if already alloced */ if (!tmplen && !SvREADONLY(sv)) |