[PATCH] eal/x86: improve rte_memcpy const size 16 performance
Stephen Hemminger
stephen at networkplumber.org
Sun Mar 3 06:40:03 CET 2024
On Sun, 3 Mar 2024 00:48:12 +0100
Morten Brørup <mb at smartsharesystems.com> wrote:
> When the rte_memcpy() size is 16, the same 16 bytes are copied twice.
> In the case where the size is knownto be 16 at build tine, omit the
> duplicate copy.
>
> Reduced the amount of effectively copy-pasted code by using #ifdef
> inside functions instead of outside functions.
>
> Suggested-by: Stephen Hemminger <stephen at networkplumber.org>
> Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
> ---
Looks good, let me see how it looks in goldbolt vs Gcc.
One other issue is that for the non-constant case, rte_memcpy has an excessively
large inline code footprint. That is one of the reasons Gcc doesn't always
inline. For > 128 bytes, it really should be a function.
More information about the dev
mailing list