diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/alf.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -206,6 +206,9 @@ int match_token(int pos) { int i; for(i = curr_token - 1; i >= INIT_TOKEN; i--) { + /* if the first char doesn't match, don't bother with memcmp. + this is a 5x speedup (!) */ + if(input_buf[pos] != *(tokentab[i].start)) continue; if(memcmp(&input_buf[pos], tokentab[i].start, tokentab[i].length) == 0) return i; } |
