Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Memory utilization and hashes

by QM (Parson)
on Jan 26, 2018 at 10:11 UTC ( #1207938=note: print w/replies, xml ) Need Help??


in reply to Memory utilization and hashes

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
--
Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1207938]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2021-02-25 02:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?