Hi Enrique,
I found some strange behaviour in the hash function.
When applied to numbers, it works ok, but when applied
to strings, it leads to a huge number of collisions.
...
# uniq hashed values, using 5 different numbers: 5
# uniq hashed values, using 5 different strings:
Hello,
I found some strange behaviour in the hash function.
When applied to numbers, it works ok, but when applied
to strings, it leads to a huge number of collisions.
An example:
# ==
(setq N 5
Lnumbers (range 1 N)
Dear Alex,
I see that the original has in these cases
any const __attribute__ ((__aligned__(2*WORD))) Rom[] = {
Does this make any difference? After all, I would expect 'WORD' to be 4
on a 32-bit machine.
It seems to be making a difference. When I simply print the size of `WORD'
this behavior may be caused by the fact that your are using only 26
values for letters out of 256 possible numbers. by considering upper and
lower case it's 52 letters out of 256, which accounts for about 20%.
52÷256×5 = 10156.25 (10271)
regards
oskar
On 02/27/2015 03:25 AM, Enrique