Skip to content

Improved Error._domain calculation #77369

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

Merged

Conversation

ChrisBenua
Copy link
Contributor

@ChrisBenua ChrisBenua commented Nov 4, 2024

Optimized Error._domain 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.

Resolves swiftlang/swift-foundation#1031

@ChrisBenua ChrisBenua requested a review from a team as a code owner November 4, 2024 16:40
@ChrisBenua
Copy link
Contributor Author

@swift-ci Please smoke test

@ChrisBenua
Copy link
Contributor Author

Here is test that will check correctness of my changes: Error.swift

@jmschonfeld
Copy link
Contributor

@swift-ci please smoke test

@ChrisBenua
Copy link
Contributor Author

Swift Test Windows Platform failed on one sourcekit-lsp test. Seems like flaky-failure to me.

@jmschonfeld could you please rerun tests for Windows platform? Thanks in advance!

@jmschonfeld
Copy link
Contributor

@swift-ci please smoke test Windows platform

@jmschonfeld jmschonfeld merged commit 023590a into swiftlang:main Nov 6, 2024
3 checks passed
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.

Error._domain calculation is inefficient
3 participants