-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Fix removeLast(_:) performance for non-random-access collections #32599
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
[stdlib] Fix removeLast(_:) performance for non-random-access collections #32599
Conversation
This replaces the `count` comparison precondition with a limited index offset, which converts the method from O(n) to O(k).
@swift-ci Please smoke benchmark |
Performance: -O
Code size: -OPerformance: -Osize
Code size: -OsizePerformance: -Onone
Code size: -swiftlibsHow to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
@swift-ci Please smoke benchmark |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibsHow to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
@swift-ci Please smoke test |
…ions (swiftlang#32599) This replaces the `count` comparison precondition with a limited index offset, which converts the method from O(n) to O(k).
This replaces the
count
comparison precondition with a limited index offset, which converts the method from O(n) to O(k). This follows up on #32451.