Put panic code path from copy_from_slice into cold function#74512
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 13, 2020
Merged
Put panic code path from copy_from_slice into cold function#74512bors merged 1 commit intorust-lang:masterfrom
copy_from_slice into cold function#74512bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
7e6cbf3 to
af4bf0d
Compare
Contributor
|
The x86 asm is shorter: https://rust.godbolt.org/z/53aodf |
af4bf0d to
a0615e6
Compare
Collaborator
|
☔ The latest upstream changes (presumably #73265) made this pull request unmergeable. Please resolve the merge conflicts. |
a0615e6 to
b044ea1
Compare
Collaborator
|
☔ The latest upstream changes (presumably #75066) made this pull request unmergeable. Please resolve the merge conflicts. |
The previous `assert_eq` generated quite some code, which is especially
problematic when this call is inlined. This commit also slightly
improves the panic message from:
assertion failed: `(left == right)`
left: `3`,
right: `2`: destination and source slices have different lengths
...to:
source slice length (2) does not match destination slice length (3)
b044ea1 to
db99f98
Compare
Contributor
Author
|
Rebased. r? @KodrAus |
Contributor
|
Nice! @bors r+ |
Collaborator
|
📌 Commit db99f98 has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions, checks-azure |
Contributor
|
Final perf results are here. This was a small win across the board, mostly concentrated in incremental builds. Nice work! |
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.
The previous
assert_eqgenerated quite some code, which is especially problematic when this call is inlined. This commit also slightly improves the panic message from:...to:
You can see the code bloat in assembly here.