-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize LexicalResolve::expansion
.
#65260
Optimize LexicalResolve::expansion
.
#65260
Conversation
Some places use the local `tcx` variable, some use `self.tcx()`. This commit removes the local variable so that all places use `self.tcx()`, for consistency.
This wins 6% on `unicode_normalization`, by avoiding a call to `lub_concrete_regions()` and a `Region` equality test.
The function only has one call site, so we don't need a tag argument.
I tried a whole lot of different things to speed this up, but commit 2 was the only thing that helped. Commits 1 and 3 are just minor clean-ups. |
@bors try @rust-timer queue |
⌛ Trying commit 8cd25e7 with merge bb3defd56b91fd479b0d8deffea23a68f3936982... |
☀️ Try build successful - checks-azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems ok but I will probably have to undo it shortly, if I land #65232. Well, perhaps adapt it is more correct -- there's probably a shortened test that would be equally efficient.
r=me once perf measurements are in |
The rust-timer queue command seems to have failed. Let's try it the old-fashioned way: @rust-timer build bb3defd56b91fd479b0d8deffea23a68f3936982 |
Queued bb3defd56b91fd479b0d8deffea23a68f3936982 with parent aa45e03, future comparison URL. |
Finished benchmarking try commit bb3defd56b91fd479b0d8deffea23a68f3936982, comparison URL. |
Up to 7% wins on @bors r=nikomatsakis |
📌 Commit 8cd25e7 has been approved by |
…-expansion, r=nikomatsakis Optimize `LexicalResolve::expansion`. A win for `unicode_normalization`. r? @nikomatsakis
…-expansion, r=nikomatsakis Optimize `LexicalResolve::expansion`. A win for `unicode_normalization`. r? @nikomatsakis
Rollup of 10 pull requests Successful merges: - #65170 (rustc_metadata: Privatize private code and remove dead code) - #65260 (Optimize `LexicalResolve::expansion`.) - #65261 (Remove `Option` from `TokenStream`) - #65332 (std::fmt: reorder docs) - #65340 (Several changes to the codegen backend organization) - #65365 (Include const generic arguments in metadata) - #65398 (Bring attention to suggestions when the only difference is capitalization) - #65410 (syntax: add parser recovery for intersection- / and-patterns `p1 @ p2`) - #65415 (Remove an outdated test output file) - #65416 (Minor sync changes) Failed merges: r? @ghost
A win for
unicode_normalization
.r? @nikomatsakis