Skip to content
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

Optimise min/max #47080

Merged
merged 1 commit into from
Dec 31, 2017
Merged

Optimise min/max #47080

merged 1 commit into from
Dec 31, 2017

Conversation

varkor
Copy link
Member

@varkor varkor commented Dec 30, 2017

Swapping the conditions generates more efficient x86 assembly. See
#46926 (comment).

r? @rkruppe

Swapping the conditions generates more efficient x86 assembly. See
rust-lang#46926 (comment).
@hanna-kruppe
Copy link
Contributor

Reproduced on playground as well, and with different optimization settings (2 and 3, panic=unwind vs panic=abort). I spot checked Aarch64 asm and it's basically the same instructions with different operands (I trust both are correct and equally fast).

@hanna-kruppe
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 31, 2017

📌 Commit fba16d3 has been approved by rkruppe

@bors
Copy link
Contributor

bors commented Dec 31, 2017

⌛ Testing commit fba16d3 with merge 54d7285...

bors added a commit that referenced this pull request Dec 31, 2017
Optimise min/max

Swapping the conditions generates more efficient x86 assembly. See
#46926 (comment).

r? @rkruppe
@bors
Copy link
Contributor

bors commented Dec 31, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: rkruppe
Pushing 54d7285 to master...

@bors bors merged commit fba16d3 into rust-lang:master Dec 31, 2017
@varkor varkor deleted the contrib-12 branch January 3, 2018 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants