-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Do the calloc
optimization for Option<bool>
#102596
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup=never Seems OK. I do wonder if we should be adding a safe-transmute like intrinsic that core uses here, rather than producing impls for an ever-increasing number of types (and only ones in the standard library, so user-defined enums don't get the same benefit). It seems pretty easy for the compiler to say "yep" and likely much lighter on the size of libcore and simpler logic wise in core. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a6b7274): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
…Simulacrum Do the `calloc` optimization for `Option<bool>` Inspired by <https://old.reddit.com/r/rust/comments/xtiqj8/why_is_this_functional_version_faster_than_my_for/iqqy37b/>.
Inspired by https://old.reddit.com/r/rust/comments/xtiqj8/why_is_this_functional_version_faster_than_my_for/iqqy37b/.