num_buckets#

Return the total number of buckets the hash holds (or would hold if its bucket array were allocated).

Synopsis#

my $n = num_buckets(%hash);

A freshly created hash may report a non-zero bucket count even before its bucket array has been materialised - Perl allocates buckets lazily. The value is always a power of two.