[V2] riscv: Implement Zbb based strlen and prefer it over the RVV based strlen implementation when Zbb is available

Florian Weimer fweimer@redhat.com
Sat Jul 4 10:50:34 GMT 2026


* Jeffrey Law:

> Neither the Zbb nor the RVV implementation seems at all sensitive to
> data alignment concerns on the K3.  So we can safely ignore that input
> axis and focus on how many cycles it takes to handle a string of a
> particular length.

The alignment affects the effective string length, though.

What about this (completely untested)?  The LLMs think it's never
slower.  The two-word and and three-word cases should be faster.

(I don't consider the attached version LLM-generated anymore.)

Thanks,
Florian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strlen-zbb.S
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260704/272e73f6/attachment.ksh>


More information about the Libc-alpha mailing list