Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: need for speed - how fast is a hash

by oko1 (Deacon)
on Jan 07, 2011 at 04:54 UTC ( [id://881008]=note: print w/replies, xml ) Need Help??


in reply to Re^3: need for speed - how fast is a hash
in thread need for speed - how fast is a hash

A hash-table, or a list, is of course an “in-memory data structure.” And that means virtual memory, of course, which is really not quite “memory” at all, but rather a very souped-up, hardware-accelerated, over-glorified disk file.

I'm sorry, but that's incorrect. The size of your VM is, of course, your memory plus your swap - but that does not mean "in-memory data structure == disk file". If, and only if, your actual memory is all filled up, then you start using swap - and even then it's a percentage game. Today, with memory on even a tiny laptop such as mine being up in the GB regions, this isn't a real issue even for data sets containing millions of records (although depending on the size of record you might be getting up there.)

So... you're actually not talking about hash lookups vs. sorting - this is more of a "if your VM is small enough and your data is large enough to get to the thrash point of the VM" projection. OK, thanks. :) I was wondering if I'd somehow misunderstood or missed something really basic regarding hash lookups. I appreciate the sanity check. :)

-- 
Education is not the filling of a pail, but the lighting of a fire.
 -- W. B. Yeats
  • Comment on Re^4: need for speed - how fast is a hash

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found