Lark-cython lets you double the speed of Lark's LALR parser (Python)
github.com
github.com
- Lark is already very fast. It's a lot easier to optimize something that takes 3 minutes :)
- There is still some Python code that is being run. For example, in the tree constructor. That can be solved in future versions.
- I'm not yet taking full advantage of Cython. For example, I'm still keeping the lookup map as a dictionary instead of an array. Also I'm still mostly working with CPython objects instead of native objects (like char*).