Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: how are the number of buckets in a perl hash chosen

by david2008 (Scribe)
on Jun 09, 2014 at 09:00 UTC ( #1089243=note: print w/replies, xml ) Need Help??


in reply to Re: how are the number of buckets in a perl hash chosen
in thread how are the number of buckets in a perl hash chosen

It did speak generally about security without going into the gory details. We learned about universal hashing and why it is important.
It was not mentioned that the modulo operation is slow. The fact that the perl hash function manages to spread the entries evenly into buckets, despite the fact that the number of buckets is even is surprising.
I guess that i will have to read the source code to understand exactly how this happens.
This is also what Tim Roughgarden suggests. He says that if we want to understand a data structure well, we should either read a text book about the issue, or an open source implementation.
  • Comment on Re^2: how are the number of buckets in a perl hash chosen

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1089243]
help
Chatterbox?
[stevieb]: ffs... an hour I've been trying to get a Pi to communicate I2C to an Arduino. Had to slow down the communication channel. Sigh

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2017-06-22 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.