Prechádzať zdrojové kódy

actually use prime numbers for all hash bucket sizes

for some reason lost in history, the prime_deltas were actually wrong,
leading to using composite numbers.
the right sequence is available at http://oeis.org/A092131.
Oswald Buddenhagen 11 rokov pred
rodič
commit
dec5f73f57
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      src/util.c

+ 2 - 2
src/util.c

@@ -537,8 +537,8 @@ arc4_getbyte( void )
 }
 
 static const unsigned char prime_deltas[] = {
-    0,  0,  1,  3,  1,  5,  3,  3,  1,  9,  7,  5,  3,  9, 25,  3,
-    1, 21,  3, 21,  7, 15,  9,  5,  3, 29, 15,  0,  0,  0,  0,  0
+    0,  0,  1,  3,  1,  5,  3,  3,  1,  9,  7,  5,  3, 17, 27,  3,
+    1, 29,  3, 21,  7, 17, 15,  9, 43, 35, 15,  0,  0,  0,  0,  0
 };
 
 int