Reuse symbol collection namespace during typechecking #6839
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
performance
Everything related to performance, speed wise or memory wise.
The symbol collection phase traverses the structure of the current package and keeps track of all name bindings using the
namespace
module. However, ths resulting structure is then discarded, and the typechecker rebuilds the structure:Since
initial_namespace
contains all bindings in the dependency graph (minus the bindings in the current package), cloning the namespace is an expensive operation.#6838 would make the call to
initial_namespace.clone()
significantly less expensive, but ideally we would like to reuse the namespace from the symbol collection phase when performing typechecking.The text was updated successfully, but these errors were encountered: