-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Replace usages of ..i + 1
ranges with ..=i
.
#56516
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
cfd8fdd
to
33de72b
Compare
This comment has been minimized.
This comment has been minimized.
Before merging this I suggest to take a look at the performance effects. Because closed intervals still are slower (but such lower performance is significant only in some situations). |
@leonardo-m Is there an issue in this repo for tracking such performance issues? |
@leonardo-m #45222 has been closed pretty long time ago. |
I know, and the problem isn't solved well yet. I'll have to reopen that issue or create a new one... |
I've added a little example in Issue #45222. |
@bors try |
Replace usages of `..i + 1` ranges with `..=i`. Before this change we were using old computer code techniques. After this change we use the new and improved computer code techniques.
☀️ Test successful - status-travis |
@rust-timer build 941e2d7 |
Success: Queued 941e2d7 with parent 77a6a61, comparison URL. |
Finished benchmarking try commit 941e2d7 |
Doesn't like like there's much of a difference in performance, right? |
Largely as expected -- ranges are almost definitively not where the compiler spends its time. I'm okay landing this from a performance perspective. |
@bors r=Mark-Simulacrum (as there haven't been any updates to the PR since @Mark-Simulacrum last looked at it and it indeed looks fine to merge) |
📌 Commit c025d61 has been approved by |
…crum Replace usages of `..i + 1` ranges with `..=i`. Before this change we were using old computer code techniques. After this change we use the new and improved computer code techniques.
Rollup of 7 pull requests Successful merges: - #56000 (Add Armv8-M Mainline targets) - #56250 (Introduce ptr::hash for references) - #56434 (Improve query cycle errors for parallel queries) - #56516 (Replace usages of `..i + 1` ranges with `..=i`.) - #56555 (Send textual profile data to stderr, not stdout) - #56561 (Fix bug in from_key_hashed_nocheck) - #56574 (Fix a stutter in the docs for slice::exact_chunks) Failed merges: r? @ghost
Before this change we were using old computer code techniques. After this change we use the new and improved computer code techniques.