Uh oh!
There was an error while loading. Please reload this page.
Fix expansion performance regression - #34652
Merged
Merged
Conversation
…(instead of by reference)" This reverts commit 5bf7970.
jseyfried
commented
Jul 5, 2016
ContributorAuthor
cc @Manishearth |
nrc
commented
Jul 5, 2016
Member
@bors: r+ |
bors
commented
Jul 5, 2016
Collaborator
📌 Commit 547a930 has been approved by |
Manishearth
commented
Jul 5, 2016
Member
bors
commented
Jul 6, 2016
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
bors
commented
Jul 6, 2016
Collaborator
💔 Test failed - auto-win-msvc-64-opt |
alexcrichton
commented
Jul 6, 2016
Member
@bors: retry On Wed, Jul 6, 2016 at 11:13 AM, bors notifications@github.com wrote:
|
bors
commented
Jul 7, 2016
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
bors
commented
Jul 7, 2016
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 freeto 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