$ perl -MDevel::Size=total_size -wE'my %h; for (1..100) { ++$h{ pack "C4", 1,2,3,$_ } } say total_size(\%h)/100' 47.56