-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove concrete inits from integer types #19624
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 |
Build failed |
Build failed |
Rework Self._convert from integer, by making it require RawSignificand: FixedWidthInteger This requirement should have always been there, and the existing implementaiton wouldn't have actually worked correctly without it. Making it explcit makes the implementation quite a bit simpler, which is nice. Add fast-path conversion that will catch all concrete integer types without needing to be a concrete implementation itself. Room for further improvement, but good start.
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
@swift-ci please benchmark |
@swift-ci please test source compatibility |
Build failed |
Build failed |
Build comment file:Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
How 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 regressions before you merge the PR. Noise: Sometimes the performance results (not code size!) contain false alarms. Unexpected regressions which are marked with '(?)' are probably noise. If you see regressions which you cannot explain you can try to run the benchmarks again. If regressions still show up, please consult with the performance team (@eeckstein). Hardware Overview
|
We should no longer need these with the protocol-based integer support we now have. Some small work may be needed to fix performance regressions, but that will come in a follow-on update.
I did have to keep the concrete init from Int around to keep the type checker from failing in some new cases; I hope we can remove that too in the future.
Fixes rdar://problem/33199966