-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[stdlib] Refactor Unicode normalization #73590
Conversation
@swift-ci please benchmark |
@swift-ci please benchmark |
Hmm, does seem to find a regression with zalgo (so, lots of combining characters), but checking my local results, when I ran it, it was okay. Hmm....
Performance (x86_64): -O
Code size: -OPerformance (x86_64): -Osize
Code size: -OsizePerformance (x86_64): -Onone
|
@swift-ci please benchmark Apple silicon |
1 similar comment
@swift-ci please benchmark Apple silicon |
@swift-ci please benchmark |
heeeey it worked, I can do it myself now :) |
Okay that seems to have cleared it up. I'll take a look at things like
(as I understand it: their error-bars overlap). So overall I think results are fairly neutral, but I'll take another look anyway. Performance (x86_64): -O
Code size: -OPerformance (x86_64): -Osize
Code size: -OsizePerformance (x86_64): -Onone
|
@swift-ci please benchmark |
@swift-ci please benchmark apple silicon @shahmishal is there an issue with that command? Neither of my attempts actually got enqueued, and neither was Alejandro’s. |
@Azoy After investigating, it appears Example: An Array PR https://ci.swift.org/view/Pull%20Requests/job/swift-PR-macos-perf/920/ Benchmarks showed the same regressions as here:
Example 2: Optimised isASCII check https://ci.swift.org/view/Pull%20Requests/job/swift-PR-macos-perf/899/ Same thing:
The zalgo thing was a much clearer indication of a performance issue from suboptimal inlining. If all we have left are some dubious results from known-flaky benchmarks (with the same kind of numbers, too), I don't think that's any indication of a regression. |
Also, can you share any info about why the string normalisation tests are disabled? They work for me locally if I remove the |
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I don't see anything here that affects the actual normalization logic, so the stream work looks pretty trivial on top of it.
@swift-ci please benchmark |
@swift-ci please test macOS platform |
@milseman Are you okay with me merging this? |
Refactors the standard library's internal normalization routines to make them independent of using String as a storage type.
This doesn't expose any public APIs or ABI symbols (it's all still just
internal
, and not@usableFromInline
), and should be performance-neutral.