bpo-40222: Mark exception table function in the dis module as private by pablogsal · Pull Request #95960 · python/cpython
and others added 30 commits
This is not complete, but I want to get to left-recursion before I fix
this, and I don't actually understand the code generator well enough
to know how to make it work for `&('foo'|'bar')`.
This was super easy. Benchmark time for xxl.py is now around 2.030 seconds. (But this is with a super simple grammar. We'll have to see what is will be with the real grammar.)
Also cleaned up the type of the second arg to add_opcode() -- it now must always be a string, the one call that didn't pass a string now calls str().
This reduces the number of is_memoized calls dramatically, to what it is for the recursive-descent parser (+1 for the root). However we still have 50% more calls to insert_memo. This has to be investigated later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters