Uh oh!
There was an error while loading. Please reload this page.
Use an array instead of a switch in token_kind_name - #63
Conversation
kasimeka
commented
Feb 12, 2023
this removes the concrete link between each Token_kind value and the name that represents it, which makes the code less readable and less extensible. the data structure that would be an improvement is a map, but that's pretty overkill |
RHL120
commented
Feb 12, 2023
Yeah I guess there is a trade off here, I would chose the array method but the maintainer might disagree with me. |
BillKek
commented
Feb 12, 2023
Speed improvement makes by the compiler itself, IMHO. And |
RHL120
commented
Feb 12, 2023
I can put it back. |
This change removes 19 lines of code and gives the function a (negligible) speed improvement .