Skip to content

[5.0] NSStringAPI: perf: UTF8 String -> Data #2175

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

Conversation

ianpartridge
Copy link
Contributor

Currently, str.data(using:allowLossyConversion:) always bridges via
NSString.

As String is now natively UTF-8 we can fastpath this conversion in the
case where the user requests UTF-8 encoding.

Port of
swiftlang/swift@a6fbc40
from the overlay.

Backport of 7704c94.

Currently, str.data(using:allowLossyConversion:) always bridges via
NSString.

As String is now natively UTF-8 we can fastpath this conversion in the
case where the user requests UTF-8 encoding.

Port of
swiftlang/swift@a6fbc40
from the overlay.
@ianpartridge
Copy link
Contributor Author

@swift-ci test

@ianpartridge
Copy link
Contributor Author

@weissi let's make Linux faster than Darwin :-)

@ianpartridge ianpartridge requested a review from weissi April 26, 2019 11:54
@millenomi millenomi merged commit aad7d6e into swiftlang:swift-5.0-branch Apr 26, 2019
@ianpartridge ianpartridge deleted the 5.0-string-data-conversion-perf branch April 26, 2019 18:55
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.

2 participants