Skip to content

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Jul 1, 2020

Cherry picks #32451 and #32599, performance fixes for removeFirst(_:) and removeLast(_:) on substrings.

• Explanation: Performance improvement for default implementations of the removeFirst(_:) and removeLast(_:) methods
• Scope of Issue: Performance change only to the Swift standard library
• Risk: Low, the change is constrained to a few default implementations, and does not change semantics
• Testing: Existing unit tests and benchmarks
• Issue: rdar://problem/64994976
• Reviewer: @lorentey

swift-ci and others added 2 commits July 1, 2020 08:37
…ions (swiftlang#32599)

This replaces the `count` comparison precondition with a limited index
offset, which converts the method from O(n) to O(k).
@natecook1000 natecook1000 requested a review from a team as a code owner July 1, 2020 13:43
@natecook1000
Copy link
Member Author

@swift-ci Please test

@theblixguy theblixguy added the r5.3 label Jul 1, 2020
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit e2c5630 into swiftlang:release/5.3 Jul 1, 2020
@natecook1000 natecook1000 deleted the nate/5_3_remove_first_last branch July 1, 2020 20:59
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants