```{index} single: num_buckets; Hash::Util function ``` ```{index} single: Hash::Util::num_buckets; Perl function ``` # num_buckets Return the total number of buckets the hash holds (or would hold if its bucket array were allocated). ## Synopsis ```perl 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.