good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Keys are simply short strings of integers. Hm. Does that mean each key is a single short integer, or each key contains several integers? Here's why I ask. The following build two hashes with 1 million key/value pairs.
If the numbers can be stored as shorts or bytes, you can save even more. I'm also having trouble reconciling your OP mention of a 3GB hash with the description of key/value sizes and total numbers above? This creates a 3 million key/value pair hash with 21-byte keys and 80-byte values and the total memory requirement is <1GB:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re^3: Small Hash a Gateway to Large Hash?
by BrowserUk
|
|