mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
Since the table of keywords is sorted, we can use strcmp to do the search and stop part way through the search if the comparison is less-than. Because all tokens that are names are subject to this search, this optimisation will improve the overall speed of the lexer when processing a script. The change also decreases code size by a little bit because we now use strcmp instead of the custom str_strn_equal function.
5.8 KiB
5.8 KiB