Skip to content
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

Conversation

airspeedswift
Copy link
Member

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.

* 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
Copy link
Member Author

@swift-ci please test

@airspeedswift airspeedswift merged commit 61e54d1 into apple:swift-4.0-branch Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant