[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use a hash table for the lexer keywords (issue 549920043 by address@
From: |
dak |
Subject: |
Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden) |
Date: |
Mon, 27 Apr 2020 01:59:23 -0700 |
Without having looked all that much at the code:
When the parser sees some \blabla it will generally first have to check
for a keyword and (when it has no match) afterwards for a variable with
that name, and a lot of those are actually music functions these days
that used to be keyword.
Wouldn't it make sense to just convert \xxx into a symbol early on in
the lexer? That is essentially a hash code, and we have lookups for
those. It seems wasteful to use two completely different ways of
hashing a string in succession when we can just turn this into a symbol
early on and work with that instead.
https://codereview.appspot.com/549920043/
- Use a hash table for the lexer keywords (issue 549920043 by address@hidden), lemzwerg, 2020/04/20
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), jonas . hahnfeld, 2020/04/20
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), hanwenn, 2020/04/20
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), jonas . hahnfeld, 2020/04/20
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden),
dak <=
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), jonas . hahnfeld, 2020/04/27
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), dak, 2020/04/27
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), dak, 2020/04/28
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), jonas . hahnfeld, 2020/04/30
- Re: Use a hash table for the lexer keywords (issue 549920043 by address@hidden), dak, 2020/04/30