Merged
Conversation
Contributor
|
@Eh2406 no problem! This looks sane to me. |
Contributor
|
☔ The latest upstream changes (presumably #5292) made this pull request unmergeable. Please resolve the merge conflicts. |
Member
|
Looks reasonable to me, thanks! I'm ok landing this without requiring a benchmark |
cargo +stable fmt
9013354 to
5c9d34b
Compare
Contributor
Author
|
Rebased. |
Member
|
@bors: r+ |
Contributor
|
📌 Commit 5c9d34b has been approved by |
Contributor
bors
added a commit
that referenced
this pull request
Apr 4, 2018
Intern more strings As pointed out in #5270 (comment), that clean up adds the mildly expensive `InternedString::new` to the hot path in the resolver. The process of this PR is: 1. Find a `InternedString::new` in the hot path. 2. replace the argument of type `&str` that is passed along to `InternedString::new` with the type `InternedString` 3. add an `InternedString::new` to the callers until it type checked. 4. Repeat from step 1. This stop if: - It was traced back to something that was already an `InternedString` - It was traced back to a `.to_string()` call - It was in a persistent object creation cc: - @djc this is building on your work, I don't want to get in your way. - @alexcrichton is this making things clearer and do you want to see a performance check?
Contributor
|
☀️ Test successful - status-appveyor, status-travis |
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.
As pointed out in #5270 (comment), that clean up adds the mildly expensive
InternedString::newto the hot path in the resolver.The process of this PR is:
InternedString::newin the hot path.&strthat is passed along toInternedString::newwith the typeInternedStringInternedString::newto the callers until it type checked.This stop if:
InternedString.to_string()callcc: