Skip to content

[PERF] Improve Constant Folding Performance #86

@iamrecursion

Description

@iamrecursion

Description

The interpreter uses constant folding liberally for correctness and accuracy during its operation. When trees are complex, this constant folding operation can take quite some time and result in quite a few allocations for values that are not necessarily kept.

Ideally we would like to improve performance of constant folding, perhaps my memoizing folded values at construction time of the nodes (but this requires sharing—see #79—to be efficient).

Spec

  • Work out the best approach to improving performance of constant folding.
  • Implement the approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions