SymbolTable does linear scan in lookupSymbolIn . Assuming module has N private symbols, it’s reasonable to expect at least N addressof
operations, which leads to N^2 complexity when we try to verify all of the addressof
operations.
Can this be improved? Any natural location to hide the hash map?
Maybe operation with SymbolTable
trait in verifier (canonicalizer?) should sort all symbols by name, and put them at the top of the region, and then lookupSymbolIn
can have an optimistic logn
step where it does binary search, and falls back on liner scan if symbol is not found (should be rare?).
Any other suggestions?