The keys are really not small here and they also contain a hell of redundant data. But size for the hash speaks of 1736142 bytes. It also has 27.000 entries like yours. I think your optimizing on the wrong part of your data structure.#!/usr/bin/perl use warnings; use strict; use Devel::Size qw(size); my %hash = (); for my $key (1..27000) { $hash{"blahblahblahblah$key"} = 1; } print size(\%hash);
Bye
PetaMem All Perl: MT, NLP, NLU
In reply to Re: memory consumption skyhigh...
by PetaMem
in thread memory consumption skyhigh...
by spx2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |