Skip to content

Formula performance improvements #173

@nsmith-

Description

@nsmith-

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestevaluatorIssues related to the evaluator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions