Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Catching Cheaters and Saving Memory

by Anonymous Monk
on Oct 12, 2006 at 15:27 UTC ( [id://577875]=note: print w/replies, xml ) Need Help??


in reply to Catching Cheaters and Saving Memory

So, last time it was enough to not slurp the data, but now I'm worried that the hashes are going to blow up (have any of you had a million by million 2-D hash?).

And rightly so. The overhead of an empty, anon hash is 92 bytes on my system (this may vary by a few bytes depending on your build). If you have a million of them, that's 92 Mb just for the hashes. You've nothing stored in them yet. A string takes 25 bytes, not counting the content of the string. Keys take slightly less, but they are still overhead. And each byte overhead multiplied by a million is an Mb.

If you have 55 Gb of raw data, which you are storing as short strings, you'll be looking into hundreds of Gbs of memory usage.

You might want to use a real database instead.

  • Comment on Re: Catching Cheaters and Saving Memory

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2025-06-24 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.