shithub: neatroff

Download patch

ref: 002f248ade44e83258b36bd0bd1bc2e3605dcc7a
parent: d49cfc1cc200ba9a3f29a4e2909af02b87d1f0dc
author: Ali Gholami Rudi <ali@rudi.ir>
date: Thu Dec 28 07:25:35 EST 2017

dict: reduce table size

--- a/dict.c
+++ b/dict.c
@@ -61,7 +61,7 @@
 	int i = d->hashlen;
 	while (--i > 0 && *key)
 		hash = (hash << 5) + hash + (unsigned char) *key++;
-	return hash & 0xffff;
+	return hash & 0x3ff;
 }
 
 void dict_put(struct dict *d, char *key, int val)