-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[stdlib] Minor clean-up and new fast path for larger (e.g. 128-bit) integer printing #85404
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
base: main
Are you sure you want to change the base?
Conversation
|
@swift-ci please benchmark |
4-5x improvement in UInt128 decimal printing benchmarkPerformance (x86_64): -O
Code size: -OPerformance (x86_64): -Osize
Code size: -OsizePerformance (x86_64): -Onone
Code size: -swiftlibsHow to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview |
|
@swift-ci smoke test |
A follow-up to #85180.
First, make the guarantee that our Swift-native implementation of integer-to-ASCII conversion always fills the suffix of the given mutable span.
(Some minor swift-format corrections interspersed.)
Then, use that guarantee to work in 64-bit chunks for larger integers—currently limited to decimal printing with a hardcoded divisor for chunking.