we-like-parsers / pegen_experiments

Experiments for the official PEG parser generator for Python
https://github.com/python/cpython/tree/master/Tools/peg_generator
Other
275 stars 29 forks source link

WIP: Implement a trie for reserved keywords in order to speedup keyword lookup #219

Closed lysnikolaou closed 4 years ago

lysnikolaou commented 4 years ago

I'm not opening this, in order to merge it, as it doesn't improve speed at all.

I just thought, it might be a good idea to have it in the closed PRs for the (unlikely) scenario we may need something like this in the future.

The trie implementation is a slightly modified version of the code here.