summaryrefslogtreecommitdiff
path: root/proto.h
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 /proto.h
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 'proto.h')
-rw-r--r--proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto.h b/proto.h
index f1d303f6f3..8eaf3fa44b 100644
--- a/proto.h
+++ b/proto.h
@@ -1548,7 +1548,7 @@ PERL_CALLCONV void Perl_hv_ename_delete(pTHX_ HV *hv, const char *name, U32 len,
#define PERL_ARGS_ASSERT_HV_FETCH_ENT \
assert(keysv)
-PERL_CALLCONV STRLEN Perl_hv_fill(pTHX_ HV const *const hv)
+PERL_CALLCONV STRLEN Perl_hv_fill(pTHX_ HV *const hv)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_HV_FILL \
assert(hv)