-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
core: implement fold
via try_fold
#138835
base: master
Are you sure you want to change the base?
Conversation
... and `rfold` via `try_rfold`. It's not possible to implement `try_fold` via `fold`, so this cannot lead to recursion. While unfortunately `try_fold` cannot be currently implemented for user types on stable, it paves a path to a future where implementing a good `try_fold` is enough to make nearly all `Iterator` traversal methods perform optimally. r? libs-api
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
core: implement `fold` via `try_fold` ... and `rfold` via `try_rfold`. It's not possible to implement `try_fold` via `fold`, so this cannot lead to recursion. While unfortunately `try_fold` cannot be currently implemented for user types on stable, this paves a path to a future where implementing a good `try_fold` is enough to make nearly all `Iterator` traversal methods perform optimally. r? libs-api
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (6d0f160): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.4%, secondary -1.9%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -0.9%, secondary 2.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary 0.3%, secondary 0.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 774.128s -> 774.93s (0.10%) |
... and
rfold
viatry_rfold
. It's not possible to implementtry_fold
viafold
, so this cannot lead to recursion. While unfortunatelytry_fold
cannot be currently implemented for user types on stable, this paves a path to a future where implementing a goodtry_fold
is enough to make nearly allIterator
traversal methods perform optimally.r? libs-api