summaryrefslogtreecommitdiffstatshomepage
path: root/drivers/display
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-17 11:10:35 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-17 11:10:35 +1100
commitae436797927c3c9f7ccdc25dd78af3dd279ca7ff (patch)
tree360c3ed597002266f631d48ddab2e025a5e5dc94 /drivers/display
parenta68c75468812859633814e90207faec1a361778e (diff)
downloadmicropython-ae436797927c3c9f7ccdc25dd78af3dd279ca7ff.tar.gz
micropython-ae436797927c3c9f7ccdc25dd78af3dd279ca7ff.zip
py/lexer: Use strcmp to make keyword searching more efficient.
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.
Diffstat (limited to 'drivers/display')
0 files changed, 0 insertions, 0 deletions