revert: "perf: reduce Module size"#7
Merged
Merged
Conversation
This reverts commit b1ceb65.
Member
Author
|
@underfin Reducing type size is a good way to improve performance, but it also has it's own restrictions. Replacing |
hyf0-agent
added a commit
to hyf0-agent/rolldown
that referenced
this pull request
Mar 26, 2026
Arena allocator investigation for optimization rolldown#7 found that: - AST drops are only 1.7ms with mimalloc (negligible) - madvise: 78-94 vs bun's 24 (already close) - The remaining ~100ms gap is purely computational The only actionable improvement: use std::process::exit(0) to skip tokio runtime shutdown, rayon thread pool teardown, and data structure drops. Saves ~20-30ms of wall time. Tool-reported time is unchanged since it measures up to file write completion.
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.
Reverts #6
Modulewould be stored inVec, which is already in the heap. Wrapping withBoxwill cause extra dereferencing on every visiting, whichModulewould be visited frequently a lot.ExternalModuleare few, you don't need to worry about the memory usages now.