2010/10/16 Uriel Rozenbaum uriel.rozenbaum@gmail.com:
What would be best to optimize the system is to have some statistic information, save every now and then the status of the htable and act accordingly to:
- If the table is pretty much or completely used and you have
collisions, make the size parameter bigger
- If the table is big enough so you'll have some slots free and still
have collisions you can try picking some key (if you have redundant ones) that is more "random" so the hash result will be more "random".
- If all above is not producing any result, add processor power to the
system so searches and inserts are faster
Hope these guidelines help, they are some conclusions from hashing and queuing theory books.
Sure, thanks a lot.