diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-01-24 15:07:50 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-05-21 18:56:25 +0100 |
commit | 4d0fbddde6c5dcb972786d09de0cab6e93056b88 (patch) | |
tree | 5a8c733a77dcda54b0b5e7c184bc1dbfd28ecd3e /hv.h | |
parent | f4431c56525a8650559872ff19c75f109a5d1190 (diff) | |
download | perl-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 'hv.h')
-rw-r--r-- | hv.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -235,7 +235,7 @@ C<SV*>. # define Nullhv Null(HV*) #endif #define HvARRAY(hv) ((hv)->sv_u.svu_hash) -#define HvFILL(hv) ((XPVHV*) SvANY(hv))->xhv_fill +#define HvFILL(hv) Perl_hv_fill(aTHX_ (const HV *)(hv)) #define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max /* This quite intentionally does no flag checking first. That's your responsibility. */ |