From: Robert Clausecker <fuz@fuz.su>
To: musl@lists.openwall.com
Subject: [musl] SIMD-enhanced libc string functions
Date: Tue, 26 Sep 2023 00:39:06 +0200 [thread overview]
Message-ID: <ZRIMCn4fGYC0rZfr@fuz.su> (raw)
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
reply other threads:[~2023-09-25 22:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZRIMCn4fGYC0rZfr@fuz.su \
--to=fuz@fuz.su \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).