Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: loading N packages takes O(N²) time #20578
There are some deduplication scans in the linker to avoid loading the same package (same import path) multiple times. These use a linear scan over all packages already loaded, so loading N packages takes O(N²) time (even with no duplicates). These scans should be replaced by map checks, cutting the time for N packages to O(N).
I have a CL and will send it.