Skip to content

skip trivial Sized predicates #53248

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

Merged
merged 1 commit into from
Aug 19, 2018

Conversation

nikomatsakis
Copy link
Contributor

This came to about a 2% win for me in cargo. Small, but hey.

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2018
///
/// Returning true means the type is known to be sized. Returning
/// `false` means nothing -- could be sized, might not be.
pub fn is_trivially_sized(&self, tcx: TyCtxt<'_, '_, 'tcx>) -> bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, didn't we use to have something like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so too but I didn't find it...

@eddyb
Copy link
Member

eddyb commented Aug 18, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 18, 2018

📌 Commit 1341e66 has been approved by eddyb

@bors 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 Aug 18, 2018
@bors
Copy link
Collaborator

bors commented Aug 19, 2018

⌛ Testing commit 1341e66 with merge 4b5307745b567835dbe3cbcaebba87a8a4b89d4c...

@bors
Copy link
Collaborator

bors commented Aug 19, 2018

⌛ Testing commit 1341e66 with merge bfc3b20...

bors added a commit that referenced this pull request Aug 19, 2018
skip trivial `Sized` predicates

This came to about a 2% win for me in cargo. Small, but hey.

r? @eddyb
@bors
Copy link
Collaborator

bors commented Aug 19, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing bfc3b20 to master...

@bors bors merged commit 1341e66 into rust-lang:master Aug 19, 2018
@nnethercote
Copy link
Contributor

We got some nice improvements from this PR and/or #53258 and/or #53316, on both NLL and non-NLL benchmarks:
https://perf.rust-lang.org/compare.html?start=b355906919927ab3c879becd14392f023af883a1&end=f28f648a9699db67b86735f97d609c3dd06f9ded&stat=instructions:u

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants