Skip to content

improve CustomNSError.errorDomain calculation #1032

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

ChrisBenua
Copy link
Contributor

Optimized CustomNSError.errorDomain calculation.

String(reflecting:) for Any.Type objects eventually calls _type(:qualified:). But String(reflecting:) call has overhead because of as? checks.

All details are listed in issue.

Also I've opened same MR for non-Darwin platforms: swiftlang/swift-corelibs-foundation#5132

@ChrisBenua ChrisBenua force-pushed the ChrisBenua/improve-CustomNSError-domain-calculation branch from 94f174e to b4e1622 Compare November 4, 2024 18:15
@jmschonfeld
Copy link
Contributor

@swift-ci please test

@jmschonfeld jmschonfeld merged commit a0147ac into swiftlang:main Nov 4, 2024
3 checks passed
cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
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.

3 participants