Fix expansion performance regression#34652
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 7, 2016
Merged
Conversation
…(instead of by reference)" This reverts commit 5bf7970.
Contributor
Author
|
cc @Manishearth |
Member
|
@bors: r+ |
Collaborator
|
📌 Commit 547a930 has been approved by |
Member
Collaborator
|
⌛ Testing commit 547a930 with merge 70e1a95... |
bors
added a commit
that referenced
this pull request
Jul 6, 2016
Fix expansion performance regression **syntax-[breaking-change] cc #31645** This fixes #34630 by reverting commit 5bf7970 of PR #33943, which landed in #34424. By removing the `Rc<_>` wrapping around `Delimited` and `SequenceRepetition` in `TokenTree`, 5bf7970 made cloning `TokenTree`s more expensive. While this had no measurable performance impact on the compiler's crates, it caused an order of magnitude performance regression on some macro-heavy code in the wild. I believe this is due to clones of `TokenTree`s in `macro_parser.rs` and/or `macro_rules.rs`. r? @nrc
Collaborator
|
💔 Test failed - auto-win-msvc-64-opt |
Member
|
@bors: retry On Wed, Jul 6, 2016 at 11:13 AM, bors notifications@github.com wrote:
|
Collaborator
|
⌛ Testing commit 547a930 with merge de78655... |
bors
added a commit
that referenced
this pull request
Jul 7, 2016
Fix expansion performance regression **syntax-[breaking-change] cc #31645** This fixes #34630 by reverting commit 5bf7970 of PR #33943, which landed in #34424. By removing the `Rc<_>` wrapping around `Delimited` and `SequenceRepetition` in `TokenTree`, 5bf7970 made cloning `TokenTree`s more expensive. While this had no measurable performance impact on the compiler's crates, it caused an order of magnitude performance regression on some macro-heavy code in the wild. I believe this is due to clones of `TokenTree`s in `macro_parser.rs` and/or `macro_rules.rs`. r? @nrc
Collaborator
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.
syntax-[breaking-change] cc #31645
This fixes #34630 by reverting commit 5bf7970 of PR #33943, which landed in #34424.
By removing the
Rc<_>wrapping aroundDelimitedandSequenceRepetitioninTokenTree, 5bf7970 made cloningTokenTrees more expensive. While this had no measurable performance impact on the compiler's crates, it caused an order of magnitude performance regression on some macro-heavy code in the wild. I believe this is due to clones ofTokenTrees inmacro_parser.rsand/ormacro_rules.rs.r? @nrc