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

[4.0] substring comparison perf improvement #10161

Merged
merged 1 commit into from Jun 12, 2017

Conversation

Projects
None yet
1 participant
@airspeedswift
Member

airspeedswift commented Jun 7, 2017

Cherry-pick of #10009

• Explanation: Avoids unnecessary copies of strings when comparing substrings to other substrings. Also adds missing operators for substring/string comparison.
• Scope: Only affects Substring comparison. String comparison continues to use existing static methods on String.
• Risk: Low
• Reviewed By: Max Moiseev
• Testing: Unit and compatibility tests, plus new tests added specific to substring comparison.

[stdlib] Use ephemeral string for substring comparison (#10009)
* Use _ephemeralString for substring comparison

Add back != for String/Substring comparison

* OK fine, Linux, if you're going to be difficult

* Different forms of comparison, tests

@airspeedswift airspeedswift requested a review from moiseev Jun 7, 2017

@airspeedswift

This comment has been minimized.

Show comment
Hide comment
@airspeedswift

airspeedswift Jun 7, 2017

Member

@swift-ci please test

Member

airspeedswift commented Jun 7, 2017

@swift-ci please test

@airspeedswift airspeedswift merged commit 61e54d1 into apple:swift-4.0-branch Jun 12, 2017

4 checks passed

Swift Test Linux Platform 9910 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 49805 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment