Make the token hash a bit smaller by using 16-bit hash tables

This commit is contained in:
H. Peter Anvin 2007-08-31 00:23:40 +00:00
parent 2c29a0b264
commit 29b1bc4603

View File

@ -143,14 +143,14 @@ print "\n";
print "int nasm_token_hash(const char *token, struct tokenval *tv)\n";
print "{\n";
print "\tstatic const int hash1[$n] =\n";
print "\tstatic const int16_t hash1[$n] =\n";
print "\t{\n";
for ($i = 0; $i < $n; $i++) {
print "\t\t", ${$g}[${$f1}[$i]], ",\n";
}
print "\t};\n\n";
print "\tstatic const int hash2[$n] =\n";
print "\tstatic const int16_t hash2[$n] =\n";
print "\t{\n";
for ($i = 0; $i < $n; $i++) {
print "\t\t", ${$g}[${$f2}[$i]], ",\n";