smlxl / storage-layout-extractor

A tool that performs extraction of storage layouts based on EVM bytecode.
https://smlxl.io
GNU Affero General Public License v3.0
132 stars 10 forks source link

[PERF] Improve Constant Folding Performance #86

Open iamrecursion opened 1 year ago

iamrecursion commented 1 year ago

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