-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
add inline to copy_within #148345
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
base: main
Are you sure you want to change the base?
add inline to copy_within #148345
Conversation
|
Does the assembly contain calls to |
It contains calls to Here's an example for both cases, the fixed 18bytes version does not contain a call to |
|
If your assembly does not include calls to copy_within, then this seems unlikely to help. It's also not that important because as a generic function, it's already eligible for inlining, so the attribute merely slightly adjusts heuristics. Have you checked that this PR helps? |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
In lz4_flex a fixed size parameter is used to
copy_withinto avoid calls to libc memmove.However, I can see in the call stack still see calls to libc. I think it's because of the missing
inline.It's using the equivalent of this:
https://godbolt.org/z/cKqYYvKbT
(in this example
copy_withinis getting inlined)