-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Stdlib performance] Make integer conversion operations transparent #79707
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 performance] Make integer conversion operations transparent #79707
Conversation
@swift-ci please smoke test |
@swift-ci please benchmark Apple Silicon |
@swift-ci please Apple Silicon benchmark |
grrr, IR differences |
63678ab
to
6282cf8
Compare
@swift-ci please smoke test |
@swift-ci please Apple Silicon benchmark |
Performance (arm64): -O
Code size: -O
Performance (arm64): -Osize
Code size: -Osize
Performance (arm64): -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 please smoke test |
@swift-ci please smoke test macOS |
OSLogOptimization pass The OSLogOptimization pass constant evaluates and folds SIL instructions that are inlined from the construction of the string interpolations passed to the log calls, which enables replacing the dynamic format string construction with a static format string. In addition to folding constant strings, it also folds constant integers and arrays whose elements are constants. This change makes it skip folding static strings, since they are already efficiently represented. rdar://146028438
The integer conversion operations were inlinable, but aren't getting inlined in debug builds, which results in unreasonably poor performance. Mark them as transparent so we don't end up with unspecialized generic code in the hot path. Fixes swiftlang#78501
a17cce1
to
c2417e0
Compare
@swift-ci please test |
Pulling in #79941 to test with it |
@swift-ci please test source compatibility |
Revert "Merge pull request swiftlang#79707 from DougGregor/transparent-integer-conversions" This reverts commit 9c2c4ea, reversing changes made to 829e03c.
Revert "Merge pull request swiftlang#80767 from meg-gupta/reverttransparent" This reverts commit 198a802, reversing changes made to 8eb43af.
Revert "Merge pull request swiftlang#80767 from meg-gupta/reverttransparent" This reverts commit 198a802, reversing changes made to 8eb43af.
The integer conversion operations were inlinable, but aren't getting inlined in debug builds, which results in unreasonably poor performance. Mark them as transparent so we don't end up with unspecialized generic code in the hot path.
Fixes #78501