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 11 forks source link

[PERF] Remove Quadratic Traversal in `register_internal` #69

Closed iamrecursion closed 1 year ago

iamrecursion commented 1 year ago

Description

Currently we call is_stable_typed inside register_internal, both of which to DFS traversals of the data. This results in quadratic traversal of the value trees when registering.

Instead, the result of is_stable_typed could be returned alongside the TCBoxedVal from register_internal, making this traversal linear again.

Spec