Skip to content

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Mar 17, 2021

This makes the memset specialization applicable to more types. And since the code now lives in a generic method it is also eligible for cross-crate inlining which should fix #83235

@rust-highfive
Copy link
Contributor

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 17, 2021
@rust-log-analyzer

This comment has been minimized.

@the8472
Copy link
Member Author

the8472 commented Mar 17, 2021

Odd, this didn't show up when running tidy locally.

the8472 added 2 commits March 18, 2021 00:25
This should also improve cross-crate inlining since the method is generic
@the8472 the8472 force-pushed the generalize-slice-fill branch from 9a25668 to d7fdd90 Compare March 17, 2021 23:25
@Xanewok
Copy link
Contributor

Xanewok commented Mar 18, 2021

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 18, 2021
@bors
Copy link
Collaborator

bors commented Mar 18, 2021

⌛ Trying commit d7fdd90 with merge ce671292e8a00a0c94483a1fe89485bb08d4762b...

@bors
Copy link
Collaborator

bors commented Mar 18, 2021

☀️ Try build successful - checks-actions
Build commit: ce671292e8a00a0c94483a1fe89485bb08d4762b (ce671292e8a00a0c94483a1fe89485bb08d4762b)

@rust-timer
Copy link
Collaborator

Queued ce671292e8a00a0c94483a1fe89485bb08d4762b with parent 36f1f04, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (ce671292e8a00a0c94483a1fe89485bb08d4762b): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 18, 2021
@the8472
Copy link
Member Author

the8472 commented Mar 22, 2021

@rustbot label T-libs-impl

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Mar 22, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Mar 27, 2021

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 27, 2021

📌 Commit d7fdd90 has been approved by m-ou-se

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2021
@m-ou-se m-ou-se assigned m-ou-se and unassigned joshtriplett Mar 27, 2021
@bors
Copy link
Collaborator

bors commented Mar 27, 2021

⌛ Testing commit d7fdd90 with merge 1010038...

@bors
Copy link
Collaborator

bors commented Mar 27, 2021

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing 1010038 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 27, 2021
@bors bors merged commit 1010038 into rust-lang:master Mar 27, 2021
@rustbot rustbot added this to the 1.53.0 milestone Mar 27, 2021
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 9, 2025
…Jung,joboet

specialize slice::fill to use memset when possible

It helps const eval performance rust-lang/miri#4616, debug builds and the gcc backend.

Previously attempted in rust-lang#83245 but reverted due to unsoundness rust-lang#87891 around potentially-uninitialized types. This PR only handles primitives where the problem does not arise.

split off from rust-lang#147294
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 9, 2025
…Jung,joboet

specialize slice::fill to use memset when possible

It helps const eval performance rust-lang/miri#4616, debug builds and the gcc backend.

Previously attempted in rust-lang#83245 but reverted due to unsoundness rust-lang#87891 around potentially-uninitialized types. This PR only handles primitives where the problem does not arise.

split off from rust-lang#147294
rust-timer added a commit that referenced this pull request Oct 9, 2025
Rollup merge of #147457 - the8472:slice_fill_memset2, r=RalfJung,joboet

specialize slice::fill to use memset when possible

It helps const eval performance rust-lang/miri#4616, debug builds and the gcc backend.

Previously attempted in #83245 but reverted due to unsoundness #87891 around potentially-uninitialized types. This PR only handles primitives where the problem does not arise.

split off from #147294
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 10, 2025
…Jung,joboet

specialize slice::fill to use memset when possible

It helps const eval performance rust-lang/miri#4616, debug builds and the gcc backend.

Previously attempted in rust-lang#83245 but reverted due to unsoundness rust-lang#87891 around potentially-uninitialized types. This PR only handles primitives where the problem does not arise.

split off from rust-lang#147294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specialized slice::fill implementations are not inlined

9 participants