Searching for hash parameters #432
Replies: 3 comments 1 reply
-
Watching how they fail is interesting, and makes me wonder how applicable this could be. I'm using a very large dictionary to compare against, but that's no guarantee against future collisions. |
Beta Was this translation helpful? Give feedback.
-
Search is running with some broadly-selected but well-limited set of primes, but I'm not entirely hopeful that a magic combination will appear that will be collision-free. Perhaps the solution is picking some reasonably fast values and implement a collision response. Unless we're getting rid of |
Beta Was this translation helpful? Give feedback.
-
Hmmmm.... I know it's forth code and not assembly, but the hash function alone costs more than searching for
Shows that there's a lot of work to be done to get anywhere near the performance of the current dictionary. Yikes! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is the code I am using to search for suitable parameters to hash all dictionary words included with
include test
with no collisions.Using the following code, the lowest multiplier I could find was 109 with a mod of 0 (which is handy for performance).
It would be nice to find a lower prime, even with a mod. The mod would be orders of magnitude less time than the multiplication time of higher primes.
edit: updated code
Beta Was this translation helpful? Give feedback.
All reactions