Don't ask to ask, just ask | |
PerlMonks |
Re: Memory utilization and hashesby QM (Parson) |
on Jan 26, 2018 at 10:11 UTC ( [id://1207938]=note: print w/replies, xml ) | Need Help?? |
I have used DBM::Deep to store native Perl hashes on disk persistently. And hashes of hashes, and hashes of arrays of ... you get the idea. It solves your problem.
It will be some factor slower (say, 5-10x) because of disk writes. There is a maximum file size, so depending on your data, you may need multiple subhashes each mapped to its own file. But if your problem is easily solved another way, staying in memory, you'll probably be happier. -QM
In Section
Seekers of Perl Wisdom
|
|