-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Native implementation of -lengthOfBytesUsingEncoding, plus handling ASCII-subset MacRoman in a few places #81791
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
@swift-ci please test |
@swift-ci please Apple Silicon benchmark |
…ngthOfBytesUsingEncoding, plus handle ASCII-subset MacRoman in a few places
ec51b98
to
1452a60
Compare
@swift-ci please Apple Silicon benchmark |
@swift-ci please test |
@swift-ci please test |
@swift-ci please test |
@swift-ci please Apple Silicon benchmark |
@swift-ci please benchmark |
@swift-ci please Apple Silicon benchmark |
@swift-ci please smoke test |
Looks like we'll need benchmark coverage for these |
@swift-ci please Apple Silicon benchmark |
@swift-ci please benchmark |
@swift-ci please test |
Eyeballing the benchmarks it looks like it's a >100x speedup for lengthOfBytes(using:) and a ~1.3x speedup for maxLengthOfBytes(using:). Will wait for the benchmarks to land so I can run the comparison properly, but I'm considering removing the maxLength bit for simplicity since it's not a huge win. |
@swift-ci please test |
@swift-ci Please smoke test Linux platform |
@@ -914,3 +942,40 @@ public func run_RealNSArrayMutableCopyObjectAtIndex(_ n: Int) { | |||
#endif | |||
} | |||
|
|||
@inline(__always) | |||
fileprivate func run_BridgedNSStringLength(_ asciiBase: Bool, _ enc: UInt, _ n: Int) { |
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.
These are the same benchmarks as the PR adding benchmarks, so once that merges this part of the diff will go away
@swift-ci please test |
@swift-ci please test |
swiftlang/swift-driver#1940 |
Please test with following PR: |
Please test with following PR: |
Please test with following PR: |
ok hopefully that'll sort things out. Bot was being finicky about the triggers before |
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.
LGTM post-LLP64 fun :)
@swift-ci please test |
@swift-ci please smoke test macOS platform |
@swift-ci please smoke test |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@swift-ci please smoke test macOS platform |
Fixes rdar://154341146 (Speed up lengthOfBytes(using:) for URL