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.
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