Skip to content
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

compiler-rt: memmove optimisation #22606

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dweiller
Copy link
Contributor

This PR seeks to improve memmove performance and fix some issues with generated code size of the current compiler-rt memmove.

I haven't yet benchmarked this implementation, though I expect the impact to be similar to #18912.

For ReleastFast code size:

target cpu master (B) 1985545 (B)
arm-freestanding cortex_m4 16362 446

Todo:

  • benchmark memmove implementation
  • investigate sharing parts of implementation with memcpy

@@ -18,7 +18,7 @@ comptime {
}
}

const Element = if (std.simd.suggestVectorLength(u8)) |vec_size|
pub const Element = if (std.simd.suggestVectorLength(u8)) |vec_size|
Copy link
Member

Choose a reason for hiding this comment

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

maybe just put them back in the same file, like it was before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could, especially if it ends up making sense to share significant parts of their implementations. I was actually planning to move Element into common.zig (with a more descriptive name) since memset is going to want it as well.

@dweiller dweiller changed the title Memmove opt compiler-rt: memmove optimisation Jan 25, 2025
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.

2 participants