Uh oh!
There was an error while loading. Please reload this page.
optimize Range[Inclusive].count() - #48024
Conversation
rust-highfive
commented
Feb 5, 2018
r? @KodrAus (rust_highfive has picked a reviewer for you, use r? to override) |
jonas-schievink
commented
Feb 5, 2018
The
|
scottmcm
commented
Feb 6, 2018
Apparently last time this was tried, it hit type inference weirdness: #39975 (comment) Maybe that's what's causing the travis failure? Also, is this even needed? There's |
bors
commented
Feb 6, 2018
☔ The latest upstream changes (presumably #48040) made this pull request unmergeable. Please resolve the merge conflicts. |
Sorry, I should have said that with #48012 (part of the conflicting merge commit above), LLVM will also unloop the (Now, llvm is being a bit dumb here, since it's explicitly branching to return If we do want to do this, I think it can be done for everything, not just built-ins, by just returning |
BatmanAoD
commented
Feb 13, 2018
@llogiq Ping from triage; is this ready for re-review? |
llogiq
commented
Feb 14, 2018
I'm going to close this for now, now that #48012 has landed, the wins are negligible. |
This special-cases count() for ranges to reduce them to simple arithmetic.
Open questions: