* [musl] SIMD-enhanced libc string functions
@ 2023-09-25 22:39 Robert Clausecker
0 siblings, 0 replies; only message in thread
From: Robert Clausecker @ 2023-09-25 22:39 UTC (permalink / raw)
To: musl
Greetings,
I'm currently working on implementing various libc string functions
using SIMD techniques for the FreeBSD libc. This is a project
sponsored by the FreeBSD Foundation, the resulting code is
available under a 2-clause BSD license. Currently, this encompasses
implementations for amd64 in scalar code or using SSE/SSE2 (two
functions also make use of SSE4.2).
Is there interest in adding such implementations to musl? Would this
be permitted by your license policy? If so, I can prepare change sets
to add these new implementations to musl once the project has concluded.
Functions that have been implemented include:
- stpcpy (thence strcpy)
- strchrnul (thence index, strchr)
- strcspn (using SSE4.2, thence strpbrk)
- strspn
- strcmp
- memchr (thence strnlen)
- strlen
- memcmp (thence bcmp)
- timingsafe_bcmp
- timingsafe_memcmp
On FreeBSD, I have added an ifunc-based dispatch framework to select the
appropriate function for the user's CPU. This anticipates additional
implementations using AVX and AVX-512. The implementations are easy to
use without the framework though.
Please let me know if there is interest.
Yours,
Robert Clausecker
--
() ascii ribbon campaign - for an 8-bit clean world
/\ - against html email - against proprietary attachments
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-25 22:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 22:39 [musl] SIMD-enhanced libc string functions Robert Clausecker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).