Skip to content

SyntaxText: improve SyntaxText.== function #595

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
merged 1 commit into from
Aug 16, 2022

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 16, 2022

Since comparing the same memory region is rare in SwiftSyntax, drop the same-address shortcut to save the execution branching.

(For those who are interested this is how RawTokenKind.init(keyword: SyntaxString) is compiled with -O)

@rintaro rintaro requested a review from CodaFi August 16, 2022 18:21
@rintaro rintaro requested a review from ahoppen as a code owner August 16, 2022 18:21
@rintaro rintaro changed the title SytnaxText: improve SyntaxText.== function SyntaxText: improve SyntaxText.== function Aug 16, 2022
@rintaro rintaro force-pushed the syntaxtext-equals branch 2 times, most recently from 25dee45 to 79f7628 Compare August 16, 2022 18:27
@rintaro
Copy link
Member Author

rintaro commented Aug 16, 2022

@swift-ci Please test

Since comparing the same memory region is rare in SwiftSyntax, drop the
shortcut to save the execution branching.
@rintaro rintaro force-pushed the syntaxtext-equals branch from 79f7628 to dadd43f Compare August 16, 2022 20:14
@rintaro
Copy link
Member Author

rintaro commented Aug 16, 2022

@swift-ci Please test

@rintaro rintaro merged commit 6144666 into swiftlang:main Aug 16, 2022
@rintaro rintaro deleted the syntaxtext-equals branch August 16, 2022 22:04
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