Anyone know how important Hash is? Hash table, etc.
I've read in many (Compiler/Interpreter Construction)/Parsing books, including The Dragon Book, that to match series of string with one string, we must use hashes.
For instance, matching the current token with symbols in symbol table.
Because of my stupid-ness and I don't know how those hashing algorithm works.
The only one that can I do is just TEST them. And that spend 3 days (3 x 24 hours) to test those algorithm. Fortunately I have 3 computers in my house with 2 cores each (so I can do multithreading).
http://cboard.cprogramming.com/showthread.php?t=110908
Somebody has made a program like that, but with random strings and I absolutely don't trust to those random things. I just need the exact one that guarantee anything.
And what is the result?
RS, JS, PJW, ELF, BKDR, SDBM, DJB, DJB2, DEK and AP hash algorithms still have collisions even with C variable naming character set: A..Z, a..z, 0..9, _, $
What's wrong with linear-strings searching?
Any comments would be appreciated.
Thanks in advance.