Re: the hash function

2015-02-26 Thread Alexander Burger
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:

the hash function

2015-02-26 Thread Enrique Sánchez
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)

Re: miniPicoLisp: miniCodeROM in Alcor6L

2015-02-26 Thread Raman Gopalan
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'

Re: the hash function

2015-02-26 Thread Oskar Wieland
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