wasm: Improve planner to reuse local variables
Previously the planner would never reuse local variables across blocks. This becomes a problem for large query sets (e.g., due to partial eval) or large rule sets (e.g., due to disjunction). This change updates the planner to reuse local variables across blocks. Anecdotally this became a problem with 10K rules that each performed a 3-tuple check. Also, restore the target variable after planning rules. Although this does not matter the planner state should be fully restored when planRules returns. Perhaps it's time to refactor so that planner state does not have to be mutated so much. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
T
Torin Sandall committed
c19eea7ae45a46479edcd3963352424c76295a86
Parent: 9925144