summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-03-11 11:42:32 +0000
committerNicholas Clark <nick@ccl4.org>2013-05-29 10:52:50 +0200
commit9faf471aadb0009c0def1e2e9ab174082632af3b (patch)
tree83cb48c21bb39e29bcc82690c0f5b8caefa47d8d /sv.c
parent99f57afc36ebadbe790958225afc2a70c73dd64a (diff)
downloadperl-9faf471aadb0009c0def1e2e9ab174082632af3b.tar.gz
Cache HvFILL() for larger hashes, and update on insertion/deletion.
This avoids HvFILL() being O(n) for large n on large hashes, but also avoids storing the value of HvFILL() in smaller hashes (ie a memory overhead on every single object built using a hash.)
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index ba09305104..ee5a9d6a7c 100644
--- a/sv.c
+++ b/sv.c
@@ -12349,6 +12349,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
}
daux->xhv_name_count = saux->xhv_name_count;
+ daux->xhv_fill_lazy = saux->xhv_fill_lazy;
daux->xhv_riter = saux->xhv_riter;
daux->xhv_eiter = saux->xhv_eiter
? he_dup(saux->xhv_eiter,