Closed nikswamy closed 1 month ago
Another fix prompted by @LukeXuan (thanks!)
Resolving names during desugaring involved a linear scan of a list of names in scope.
For modules with a large number of definitions, this exposes quadratic behavior in desugaring.
This PR fixes the problem by coalescing streaks of local bindings and top-level definitions in the environment into maps for faster lookup.
Another fix prompted by @LukeXuan (thanks!)
Resolving names during desugaring involved a linear scan of a list of names in scope.
For modules with a large number of definitions, this exposes quadratic behavior in desugaring.
This PR fixes the problem by coalescing streaks of local bindings and top-level definitions in the environment into maps for faster lookup.