diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-03-11 11:42:32 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-05-29 10:52:50 +0200 |
commit | 9faf471aadb0009c0def1e2e9ab174082632af3b (patch) | |
tree | 83cb48c21bb39e29bcc82690c0f5b8caefa47d8d /sv.c | |
parent | 99f57afc36ebadbe790958225afc2a70c73dd64a (diff) | |
download | perl-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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, |