-
Notifications
You must be signed in to change notification settings - Fork 261
Add optimize(size)
to some particularly large functions
#705
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: master
Are you sure you want to change the base?
Conversation
Hm. Is there a way to check that we're actually built as part of libstd, without enabling for |
I mean, I think that's kind of the point, no? |
It does seem more than slightly annoying though that we aren't really testing building this in std under actually-as-if-std conditions (e.g. nightly features), to be clear. |
081b94e
to
a748d77
Compare
Changed the |
It is indeed. I am of half a mind to give that CI job the knife, but it certainly won't block this. It is supposed to help answering questions like "is this exact kind of PR an improvement?" but I can manually validate things. Small questions first before I go looking: Did you evaluate these functions for size based on their source size or the actual compiled code size? Did the reduction happen only in those functions or was the entire compiled libstd smaller? I'm mostly wondering to make sure we didn't just hit some weird inlining thresholds or anti-thresholds. |
I think those "anti-thresholds" are called "limits", Jubilee. |
I identified these functions with |
When built as part of libstd, this saves a few kb in hello world binaries.
The comments are formatted like they are so that if this feature is stabilized they can be identified and used unconditionally.