Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 26 Sep 2023 00:39:06 +0200
From: Robert Clausecker <fuz@....su>
To: musl@...ts.openwall.com
Subject: SIMD-enhanced libc string functions

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.