Skip to content

Conversation

Catfish-Man
Copy link
Contributor

@Catfish-Man Catfish-Man commented Sep 3, 2025

Fixes rdar://159771498

@Catfish-Man Catfish-Man self-assigned this Sep 3, 2025
@Catfish-Man Catfish-Man requested a review from a team as a code owner September 3, 2025 02:53
@Catfish-Man
Copy link
Contributor Author

@swift-ci please test

@Catfish-Man
Copy link
Contributor Author

@swift-ci please Apple Silicon benchmark

if _guts.isSmallASCII {
let maybeTagged = _guts.asSmall.withUTF8 { bufPtr in
return unsafe _createCFString(
if _guts.isSmall {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly just rearranging the code to be a bit clearer. The substantive change is is switching from grow + recursing into bridgeToObjectiveCImpl -> __StringStorage.create, which should let us create the actual size we want rather than unnecessarily padded.

@Catfish-Man
Copy link
Contributor Author

15% or so win for ObjectiveCBridgeStubToNSString. Honestly better than I expected.

@Catfish-Man
Copy link
Contributor Author

docc failure is unrelated, will rerun tests once it's fixed

@Catfish-Man Catfish-Man enabled auto-merge (squash) September 3, 2025 21:19
@Catfish-Man Catfish-Man disabled auto-merge September 3, 2025 21:22
@Catfish-Man
Copy link
Contributor Author

@swift-ci please test macOS platform

@Catfish-Man Catfish-Man merged commit 11adbdd into swiftlang:main Sep 4, 2025
6 checks passed
Copy link

@khamsukanon79120 khamsukanon79120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

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.

4 participants