summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-01-24 15:07:50 +0000
committerNicholas Clark <nick@ccl4.org>2010-05-21 18:56:25 +0100
commit4d0fbddde6c5dcb972786d09de0cab6e93056b88 (patch)
tree5a8c733a77dcda54b0b5e7c184bc1dbfd28ecd3e /proto.h
parentf4431c56525a8650559872ff19c75f109a5d1190 (diff)
downloadperl-4d0fbddde6c5dcb972786d09de0cab6e93056b88.tar.gz
Make HvFILL() count the allocated buckets, instead of reading a stored value.
Add a function Perl_hv_fill to perform the count. This will save 1 IV per hash, and on some systems cause struct xpvhv to become cache aligned.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index fef2fcb721..8d4f283aea 100644
--- a/proto.h
+++ b/proto.h
@@ -1028,6 +1028,11 @@ PERL_CALLCONV void* Perl_hv_common_key_len(pTHX_ HV *hv, const char *key, I32 kl
#define PERL_ARGS_ASSERT_HV_COMMON_KEY_LEN \
assert(key)
+PERL_CALLCONV STRLEN Perl_hv_fill(pTHX_ HV const *const hv)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_HV_FILL \
+ assert(hv)
+
PERL_CALLCONV void Perl_hv_free_ent(pTHX_ HV *hv, HE *entryK)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_HV_FREE_ENT \