You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current formula implementation walks an AST on evaluation. The AST is not optimized beforehand.
We could improve this in a few ways:
Optimize the AST
Convert the AST into opcodes and run in a VM (is making our own stack better than AST walk? WIP attempt at master...formula_perf)
Find a way to statically link against llvm and compile to real machine code
A simpler solution might be to check if the formula is some regular pattern and convert it to a more specialized node. For example, we could create dedicated Horner-form polynomial evaluation nodes from formulas that are just multivariate polynomials. There is some literature on multivariate Horner forms e.g. https://arxiv.org/abs/1207.7079 and an existing python package: multivar_horner.
The text was updated successfully, but these errors were encountered:
The current formula implementation walks an AST on evaluation. The AST is not optimized beforehand.
We could improve this in a few ways:
A simpler solution might be to check if the formula is some regular pattern and convert it to a more specialized node. For example, we could create dedicated Horner-form polynomial evaluation nodes from formulas that are just multivariate polynomials. There is some literature on multivariate Horner forms e.g. https://arxiv.org/abs/1207.7079 and an existing python package: multivar_horner.
The text was updated successfully, but these errors were encountered: