Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^8: RFC: Is there a solution to the flaw in my hash mechanism? ($o != $i)

by BrowserUk (Patriarch)
on Jun 03, 2015 at 11:57 UTC ( [id://1128939]=note: print w/replies, xml ) Need Help??


in reply to Re^7: RFC: Is there a solution to the flaw in my hash mechanism? ($o != $i)
in thread RFC: Is there a solution to the flaw in my hash mechanism? (And are there any others?)

I'm not convinced that either of those is required. But I'll refrain from trying to make a case stronger than that at least at this point.

How would you distinguish between an empty slot and one that is in use other than by reserving one value from the input range (0 .. 2**64-1) as a sentinel or tell tale value?


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". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
  • Comment on Re^8: RFC: Is there a solution to the flaw in my hash mechanism? ($o != $i)

Replies are listed 'Best First'.
Re^9: RFC: Is there a solution to the flaw in my hash mechanism? (sentinel)
by tye (Sage) on Jun 03, 2015 at 13:49 UTC

    Sorry, I mistook the context of that statement due to lazy reading.

    Another approach would be a bitmap.

    You could even avoid a bitmap by, for example, sharding odd hash values into one hash table and even hash values into a second hash table. Then the 0 bit could indicate "empty" though the meaning of the value of that bit would be reversed between the two tables.

    - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-19 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found