[PATCH v1 2/3] riscv: Add RVV implementation __strcpy_vector
Jeff Law
jlaw@ventanamicro.com
Mon Sep 22 12:26:39 GMT 2025
On 9/22/25 5:35 AM, Yao Zihong wrote:
>> Also, I note the submitted patch uses m4. Why not m8?
>
> On the two platforms I had access to (SpacemiT M1 and K230), using LMUL=8
> did not show a clear throughput benefit compared to LMUL=4 in the measured
> ranges. In fact, for very short strings (<=32B) the m8 variant sometimes
> performed worse.
>
> That said, I am not sure whether m4 should really be considered a balanced
> choice, or if it also risks being an over-optimization tied to just a few
> implementations. I’m happy to revisit this once we have results from a
> broader set of platforms.
I'd use the same broad approach to this question as well, ie what's a
sensible value, even if it's not the perfect value for a given design.
Then iterate with a per-design/uarch selection if that's really useful.
However, I wouldn't be terribly surprised to find that LMUL8 isn't a
good setting in general for some of these string ops. We can evaluate
that as more designs become available.
jeff
More information about the Libc-alpha
mailing list