-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline try_get
.
#50931
Merged
Merged
Inline try_get
.
#50931
Conversation
This file contains 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
This speeds up lots of rustc-perf benchmark runs. The maximum improvement is 1%, but there are a lot in the 0.5--1.0% range.
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
May 21, 2018
@@ -105,6 +105,10 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> { | |||
/// start executing the query, or it returns with the result of the query. | |||
/// If the query is executing elsewhere, this will wait for it. | |||
/// If the query panicked, this will silently panic. | |||
/// | |||
/// This function is inlined because that results in a noticeable speedup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can/should we use normal comments here? This doesn't seem useful when shown in rustdoc.
@bors r+ |
📌 Commit 9512016 has been approved by |
bors
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
May 21, 2018
@bors rollup |
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
May 22, 2018
…elwoerister Inline `try_get`. This speeds up lots of rustc-perf benchmark runs. The maximum improvement is 1%, but there are a lot in the 0.5--1.0% range.
bors
added a commit
that referenced
this pull request
May 22, 2018
Rollup of 15 pull requests Successful merges: - #50846 (Add E0665) - #50849 (CheckLoopVisitor: also visit closure arguments) - #50863 (Make `[T]::len` and `str::len` const fn) - #50875 (rustdoc: use "short form" doc(cfg) printing even when combined with other conditionals) - #50913 (Fix typo in cell.rs) - #50914 (Issue #50636: Improve error diagnostic with missing commas after struct fields.) - #50931 (Inline `try_get`.) - #50932 (Optimize seen Predicate filtering.) - #50945 (Stabilize feature from_ref) - #50946 (rustc: Fix procedural macros generating lifetime tokens) - #50947 (rustdoc: set tab width in rust source blocks) - #50952 (Add the 2018 edition of the book to doc.rust-lang.org) - #50958 (Micro-optimization on PR#50697) - #50961 (Fix FileCheck finding with MSVC) - #50963 (Right-size the `VecDeque` in `coerce_unsized`.) Failed merges:
Shnatsel
referenced
this pull request
in image-rs/image
May 28, 2020
The intention here is to help the optimizer. For methods where access out-of-bounds is not fatal the bounds checking code appears to be repeated unnecessarily in many cases—once for a manual check to avoid the panic and once in the impl in the path that would lead to such panic. This is backwards compatible in that the new methods are default implemented on the traits. In the long term it seems nevertheless advisable to flip this around and default implement the panicking method instead. This would also improve possibilities for indexing and adherence to the API guidelines.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
This speeds up lots of rustc-perf benchmark runs. The maximum
improvement is 1%, but there are a lot in the 0.5--1.0% range.