[PATCH v2] aarch64: add optimised strspn/strcspn

lhr@disroot.org lhr@disroot.org
Mon Sep 1 18:50:55 GMT 2025


> You could try removing both balign's before the 2nd loop. That avoids the 2 NOPs,
> and since the loop end is now aligned, it means 3 fetches and it fits in a cacheline.

This works well; I've amended it to removing only the second directive, since
the first means strspn's first loop takes 2 fetches instead of 3, which I
think is worth the NOPs (strcspn's is already aligned so it has no NOPs).

I agree that all likely gains have been squeezed from this --  I'll resubmit
as v3.

Thanks very much,
Remph


More information about the Libc-alpha mailing list