-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib][DNM] Replace several subscript gets with reads #19858
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
|
cc @rjmccall |
I'll take a look. |
What about the unsafeAddressWithNativeOwner in ManagedBuffer? |
I pulled that one out in the hope that was what was causing the crash (it wasn't) |
Okay, a bunch of patches I have in flight at the moment collectively seem to get the stdlib building with this PR. |
The last of those PRs is landing as #20352. |
@swift-ci please benchmark |
@swift-ci please test |
@swift-ci please smoke test compiler performance |
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
|
Build failed |
@swift-ci please test linux platform |
@rjmccall do you have a view on those benchmark numbers from this change being expected/unexpected? |
I'm seeing similar things with #20415, and I've been trying to tweak the heuristics accordingly. I know that we're not really taking advantage of read accessors very much right now on the caller side, but some of these are, yeah, not where we want them. You might try testing the combination to see if it helps. |
@swift-ci please benchmark |
1 similar comment
@swift-ci please benchmark |
Re-benchmarking to see if much has changed after a few other things like the new String have landed. |
Build comment file:Performance: -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 Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Giving this a go. Seems to make the compiler a bit crashy though...