Skip to content

Optimize LexicalResolve::expansion. - #65260

Merged
bors merged 3 commits into
rust-lang:masterfrom
nnethercote:optimize-LexicalResolve-expansion
Oct 15, 2019
Merged

Optimize LexicalResolve::expansion.#65260
bors merged 3 commits into
rust-lang:masterfrom
nnethercote:optimize-LexicalResolve-expansion

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

A win for unicode_normalization.

r? @nikomatsakis

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.
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2019
@nnethercote

Copy link
Copy Markdown
ContributorAuthor

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.

@nnethercote

Copy link
Copy Markdown
ContributorAuthor

@bors try @rust-timer queue

@bors

bors commented Oct 10, 2019

Copy link
Copy Markdown
Collaborator

⌛ Trying commit 8cd25e7 with merge bb3defd56b91fd479b0d8deffea23a68f3936982...

@bors

bors commented Oct 10, 2019

Copy link
Copy Markdown
Collaborator

☀️ Try build successful - checks-azure
Build commit: bb3defd56b91fd479b0d8deffea23a68f3936982 (bb3defd56b91fd479b0d8deffea23a68f3936982)

@nikomatsakisnikomatsakis left a comment

Copy link
Copy Markdown
Contributor

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.

@nikomatsakis

nikomatsakis commented Oct 10, 2019

Copy link
Copy Markdown
Contributor

r=me once perf measurements are in

@nnethercote

Copy link
Copy Markdown
ContributorAuthor

The rust-timer queue command seems to have failed. Let's try it the old-fashioned way:

@rust-timer build bb3defd56b91fd479b0d8deffea23a68f3936982

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued bb3defd56b91fd479b0d8deffea23a68f3936982 with parent aa45e03, future comparison URL.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking try commit bb3defd56b91fd479b0d8deffea23a68f3936982, comparison URL.

@nnethercote

Copy link
Copy Markdown
ContributorAuthor

Up to 7% wins on unicode_normalization, and negligible effects on other benchmarks.

@bors r=nikomatsakis

@bors

bors commented Oct 11, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 8cd25e7 has been approved by nikomatsakis

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 14, 2019
…-expansion, r=nikomatsakis
Optimize `LexicalResolve::expansion`.
A win for `unicode_normalization`.
r? @nikomatsakis
@CentrilCentril mentioned this pull request Oct 14, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 15, 2019
…-expansion, r=nikomatsakis
Optimize `LexicalResolve::expansion`.
A win for `unicode_normalization`.
r? @nikomatsakis
@tmandrytmandry mentioned this pull request Oct 15, 2019
bors added a commit that referenced this pull request Oct 15, 2019
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
@bors
bors merged commit 8cd25e7 into rust-lang:masterOct 15, 2019
@nnethercote
nnethercote deleted the optimize-LexicalResolve-expansion branch October 15, 2019 05:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@nnethercote@bors@nikomatsakis@rust-timer@rust-highfive