Skip to content

Conversation

@quaternic
Copy link
Contributor

@quaternic quaternic commented Dec 6, 2025

As discussed in #911

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Needs to wait for #1002 but I'll merge after.

@rustbot
Copy link
Collaborator

rustbot commented Dec 6, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@tgross35 tgross35 enabled auto-merge (squash) December 6, 2025 00:57
@tgross35 tgross35 merged commit 8ab6f08 into rust-lang:main Dec 6, 2025
38 checks passed
@tgross35
Copy link
Contributor

tgross35 commented Dec 6, 2025

Yay for small perf improvements, a single instruction saved on memmove forward tests:

 mem_icount::memmove::forward_move large_spread_off_0:setup_forward(Cfg { len : 16, spread : Large, off ...
  Baselines:                      softfloat|softfloat (old)
  Instructions:                         299|300                  (-0.33333%) [-1.00334x]
  L1 Hits:                              420|420                  (No change)
  LL Hits:                                0|1                    (-100.000%) [---inf---]
  RAM Hits:                              12|12                   (No change)
  Total read+write:                     432|433                  (-0.23095%) [-1.00231x]
  Estimated Cycles:                     840|845                  (-0.59172%) [-1.00595x]

I think that's the test and that I actually have forward and backward swapped at

fn forward_move((len, spread, mut buf): (usize, usize, AlignedSlice)) {
// Test moving from the start of the buffer toward the end
unsafe {
black_box(memmove(
black_box(buf[spread..].as_mut_ptr()),
black_box(buf.as_ptr()),
black_box(len),
));
}
}
and
fn backward_move((len, spread, mut buf): (usize, usize, AlignedSlice)) {
// Test moving from the end of the buffer toward the start
unsafe {
black_box(memmove(
black_box(buf.as_mut_ptr()),
black_box(buf[spread..].as_ptr()),
black_box(len),
));
}
}
...

@quaternic quaternic deleted the asm-fixes branch December 6, 2025 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants