Repository navigation
Conversation
llvm.LinkModules creates a new llvm::Linker for every package, and each one collects the struct types of the whole destination module first, so linking grew quadratically with the number of packages. For a program with ~250 packages this took 29s; with one Linker for all of them it takes 8s. The generated code is unchanged.
Contributor
Author
|
Submitted as a draft until that go-llvm PR lands, as CI can't pass until that happens and this PR is updated to point |
Member
|
🤖 |
Contributor
Author
|
Thanks, both done in 08f0674. |
dgryski
approved these changes
Oct 22, 2026
dgryski
left a comment
Member
There was a problem hiding this comment.
LGTM (once go-llvm fix is merged and this is rebased)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TinyGo side follow up to tinygo-org/go-llvm#86
llvm.LinkModules creates a new llvm::Linker for every package, and each one collects the struct types of the whole destination module first, so linking grew quadratically with the number of packages. For a program with ~250 packages this took 29s; with one Linker for all of them it takes 8s. The generated code is unchanged.