mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
Make the token hash a bit smaller by using 16-bit hash tables
This commit is contained in:
parent
2c29a0b264
commit
29b1bc4603
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user