Skip to content
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

[DNM] test swiftlang/swift-syntax#2944 #221

Closed
wants to merge 6 commits into from
Closed

Conversation

kkebo
Copy link
Owner

@kkebo kkebo commented Jan 20, 2025

bnbarham and others added 6 commits January 10, 2025 09:41
swift-format#883 fixed outputting incorrect line numbers, but introduced
a performance regression. swift-format#901 improved this back to around
the original, but had to be reverted as it introduced a an issue due to
counting codepoints rather than characters.

Introduce a similar optimization again, but only for the first portion
of the string (prior to the last newline).

Fixes swift-format#894 again.
* `UnicodeScalar(_:)` on arbitrary UTF8 code point was wrong. It only
  works correctly if the code point is < 0x80
* `UnicodeScalar.Properties.isWhitespace` is slow. Profiling 'lint'
  shows it's taking 13.6 of the entire time
* Whitespaces in Unicode "Basic Latin" block are well defined, there's
  no need to consult `UnicodeScalar.Properties`
[Perf][WhitespaceLinter] Use hand crafted "is whitespace" function
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