[pull] canary from vercel:canary#881
Merged
pull[bot] merged 3 commits intocode:canaryfrom Mar 15, 2026
Merged
Conversation
# What Add `lto = "thin"` to the workspace-level `[profile.release]` in `Cargo.toml`. # Why Thin LTO enables cross-crate optimization at link time, improving runtime performance of the final artifacts (next-napi-bindings native module, turbopack-cli binary, and benchmarks) without the full build time cost of fat LTO. # How Added `lto = "thin"` to the workspace root `[profile.release]` section. This applies to all release-profile link targets in the workspace, including binaries, cdylibs, and benchmarks. The `release-with-assertions` and `release-with-debug` profiles inherit from `release`, so they also benefit.
# What Make a significant chunk of the remaining turbotask registration code (Values, Traits and Value/Trait impls) `const`. The vtable lookup for trait methods is constructed at compile time, allowing us to look up a trait's implementation in near-constant time. Introduces a new, common RegistryType we use for Values, Traits and Functions to reduce duplication. We still have a Lazy guard on each registry, but that will probably be removed if we migrate to distributed slices. NOTE: This removes a number of Lazy guards, but not all of them to avoid making the PR too large. The next pass of PR will remove the remaining Lazy guards, where possible. # Why By making this code `const`, we reduce the overall init time of the executable, make LTO a little more powerful (when we end up using that), reduce startup allocations, and reduce the amount of time we spend checking Lazy atomics. In hyperfine tests of the benchmark-apps folder, we see a 1% to 3% speedup for compilation.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )