-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Factor out unsafe pointer stuff into _Pointer extensions #17628
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 smoke benchmark |
@swift-ci please smoke test compiler performance |
@swift-ci please smoke benchmark |
@swift-ci please smoke test compiler performance |
Build comment file:Optimized (O)Regression (11)
Improvement (7)
No Changes (428)
Hardware Overview
|
d7fef48
to
a087834
Compare
@swift-ci please smoke test compiler performance |
@swift-ci please test |
@natecook1000 the only issue here is the docs end up getting duplicated. But I'm guessing these docs are pretty settled at this point so hopefully this is ok. |
Build failed |
Build failed |
Huh, I really thought we defaulted |
Build comment file:Summary for master smoketestUnexpected test results, excluded stats for ReactiveCocoa No regressions above thresholds Debugdebug briefRegressed (0)
Improved (1)
Unchanged (delta < 1.0% or delta < 100.0ms) (1)
debug detailedRegressed (0)
Improved (1)
Unchanged (delta < 1.0% or delta < 100.0ms) (22)
Releaserelease briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
release detailedRegressed (0)
Improved (4)
Unchanged (delta < 1.0% or delta < 100.0ms) (19)
|
Build comment file:Optimized (O)Regression (20)
Improvement (15)
No Changes (411)
Hardware Overview
|
There is a lot of boilerplate across
Unsafe{Raw}{Mutable}Pointer
that can instead be done via protocol extensions on the already-existing_Pointer
protocol, since it's all identical and only relies on access to the underlying builtin pointer. This reduces the actual code to the point where it makes sense to de-gyb the file. Since most of this code is transparent anyway, it should make little difference to performance.More code could be shared via the introduction of additional protocols (like for mutable pointers) but that's probably not worth it.