Skip to content

Generalize and inline slice::fill specializations - #83245

Merged
bors merged 2 commits into
rust-lang:masterfrom
the8472:generalize-slice-fill
Mar 27, 2021
Merged

Generalize and inline slice::fill specializations#83245
bors merged 2 commits into
rust-lang:masterfrom
the8472:generalize-slice-fill

Conversation

@the8472

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

r? @joshtriplett

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

@rust-highfiverust-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
Copy Markdown
MemberAuthor

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

This should also improve cross-crate inlining since the method is generic
@the8472
the8472force-pushed the generalize-slice-fill branch from 9a25668 to d7fdd90CompareMarch 17, 2021 23:25
@Xanewok

Copy link
Copy Markdown
Contributor

@bors try @rust-timer queue

@rust-timer

Copy link
Copy Markdown
Collaborator

Awaiting bors try build completion.

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

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

bors commented Mar 18, 2021

Copy link
Copy Markdown
Collaborator

⌛ Trying commit d7fdd90 with merge ce671292e8a00a0c94483a1fe89485bb08d4762b...

@bors

bors commented Mar 18, 2021

Copy link
Copy Markdown
Collaborator

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

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued ce671292e8a00a0c94483a1fe89485bb08d4762b with parent 36f1f04, future comparison URL.

@rust-timer

Copy link
Copy Markdown
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

@rustbotrustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 18, 2021
@the8472

Copy link
Copy Markdown
MemberAuthor

@rustbot label T-libs-impl

@rustbotrustbot 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
Copy Markdown
Member

Thanks!

@bors r+

@bors

bors commented Mar 27, 2021

Copy link
Copy Markdown
Collaborator

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

@borsbors 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-sem-ou-se assigned m-ou-se and unassigned joshtriplettMar 27, 2021
@bors

bors commented Mar 27, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d7fdd90 with merge 1010038...

@bors

bors commented Mar 27, 2021

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Mar 27, 2021
@bors
bors merged commit 1010038 into rust-lang:masterMar 27, 2021
@rustbotrustbot 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-actionsBot 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
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Oct 13, 2025
specialize slice::fill to use memset when possible
It helps const eval performance rust-lang#4616, debug builds and the gcc backend.
Previously attempted in rust-lang/rust#83245 but reverted due to unsoundness rust-lang/rust#87891 around potentially-uninitialized types. This PR only handles primitives where the problem does not arise.
split off from rust-lang/rust#147294
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant 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

@the8472@rust-highfive@rust-log-analyzer@Xanewok@rust-timer@bors@m-ou-se@joshtriplett@rustbot