freebsd-skq/lib
Mateusz Guzik 710e45c4b8 Reimplement strlen
The previous code neglected to use primitives which can find the end
of the string without having to branch on every character.

While here augment the somewhat misleading commentary -- strlen as
implemented here leaves performance on the table, especially so for
userspace. Every arch should get a dedicated variant instead.

In the meantime this commit lessens the problem.

Tested with glibc test suite.

Naive test just calling strlen in a loop on Haswell (ops/s):

$(perl -e "print 'A' x 3"):
before:	211198039
after:	338626619

$(perl -e "print 'A' x 100"):
before:	83151997
after:	98285919
2021-01-29 23:48:26 +00:00
..
atf pkgbase: Install atf and kyua in the tests package 2021-01-04 16:20:47 +01:00
clang libllvmminimal: Add missing Support/ABIBreak.cpp 2021-01-27 19:19:00 +00:00
csu Add C startup code tests for PIE binaries. 2020-11-10 19:09:35 +00:00
flua flua: Add a libjail module 2020-10-24 17:08:59 +00:00
geom Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
googletest Rename NO_WERROR -> MK_WERROR=no 2021-01-07 09:31:03 +00:00
kyua Install expected kyua docs. 2020-03-26 17:34:17 +00:00
lib9p lib9p: fix building on systems without capser 2021-01-04 20:48:48 +01:00
lib80211 80211: non-functional changes 2020-10-07 21:56:58 +00:00
libalias Rename NO_WERROR -> MK_WERROR=no 2021-01-07 09:31:03 +00:00
libarchive Don't include libarchive fuzz tests by default 2021-01-25 15:09:26 +00:00
libauditd libauditd: make it a PRIVATELIB 2020-04-19 02:20:39 +00:00
libbe When be_activate() turns on a new boot environment, it always deactivates 2021-01-08 09:23:16 -08:00
libbearssl Revert that! 2020-07-19 23:56:19 +00:00
libbegemot Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libblacklist Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libblocksruntime Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
libbluetooth Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libbsdstat Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libbsm libbsm: fix some MLINKS 2020-04-19 02:18:40 +00:00
libbsnmp Add missing src.opts.mk include 2020-11-13 23:18:04 +00:00
libbz2 Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libc Reimplement strlen 2021-01-29 23:48:26 +00:00
libc_nonshared
libc++ Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libc++experimental Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
libcalendar Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcam libcam(3): make cam_getccb(3) zero the whole ccb, not just the header 2020-12-29 14:26:06 +00:00
libcapsicum Add missing FreeBSD functions to -legacy when building on macOS/Linux 2020-08-25 13:23:31 +00:00
libcasper tests: Skip cap_fileargs if build without capsicum capabilities 2021-01-26 22:19:36 +01:00
libclang_rt Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 2021-01-03 13:54:24 +01:00
libcom_err Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcompat
libcompiler_rt Rename NO_WERROR -> MK_WERROR=no 2021-01-07 09:31:03 +00:00
libcrypt Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libcuse Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libcxxrt Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libdevctl Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libdevdctl libdevdctl: Force full match of "timestamp" field name 2020-06-23 16:29:59 +00:00
libdevinfo devinfo: add man page links 2020-08-04 21:09:36 +00:00
libdevstat Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libdl
libdpv Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libdwarf Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libedit Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libefivar libefivar: define MDE_CPU_RISCV64 2020-07-06 17:47:29 +00:00
libelf libelf: add compression header support 2020-10-23 16:35:23 +00:00
libelftc Update ELF Tool Chain to upstream r3769 2019-12-05 13:20:15 +00:00
libevent1 rename in-tree libevent v1 to libevent1 2020-05-28 22:05:50 +00:00
libexecinfo Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
libexpat Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libfetch Remove support for SSLv3 from fetch(3). 2020-11-24 22:10:33 +00:00
libfigpar Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libgcc_eh After r364423, which ensures the callbacks that dl_iterate_phdr(3) 2020-08-25 20:07:11 +00:00
libgcc_s Rename NO_WERROR -> MK_WERROR=no 2021-01-07 09:31:03 +00:00
libgeom Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libgpio Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libgssapi libgssapi: modernize static string array use 2020-10-13 17:14:30 +00:00
libiconv_modules Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libifconfig libifconfig: Add a symbol map 2021-01-14 11:41:28 -05:00
libipsec Refer to AES-CBC as "aes-cbc" rather than "rijndael-cbc" for IPsec. 2020-06-04 22:58:37 +00:00
libipt Update Intel Processor Trace decoder library. 2019-10-10 12:46:34 +00:00
libjail libjail: Handle an error from reallocarray() when trimming the buffer. 2020-01-07 21:44:27 +00:00
libkiconv pkgbase: Put a lot of binaries and lib in FreeBSD-runtime 2019-09-05 14:13:08 +00:00
libkvm jobc: rework detection of orphaned groups. 2021-01-10 04:41:20 +02:00
libldns Update Makefile.depend files 2019-12-11 17:37:53 +00:00
liblua contrib/lua: update to 5.4.2 2021-01-13 23:56:18 -06:00
liblutok Add liblutok a lightweight C++ API for lua. 2020-03-23 18:26:23 +00:00
liblzma liblzma: Make liblzma use libmd implementation of SHA256. 2020-06-20 21:32:07 +00:00
libmagic Fix installation of magic file. 2020-06-17 15:57:59 +00:00
libmd Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libmemstat malloc: move malloc_type_internal into malloc_type 2020-11-06 21:33:59 +00:00
libmilter Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libmp Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libmt Add the LTO-9 density code to libmt and the mt(1) man page. 2020-12-10 21:06:06 +00:00
libnetbsd
libnetgraph Fix SYNPOSIS section to point to the proper include directive. 2020-05-15 12:04:39 +00:00
libnetmap [libnetmap] Fix 32 bit compilation under gcc-6.4 2020-11-02 15:01:37 +00:00
libngatm Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libnv Fix libnv build post rename 2020-06-27 02:17:04 +00:00
libomp Update build glue for libomp. 2020-01-27 18:04:28 +00:00
libopenbsd Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libopencsd Update opencsd to 0.14.2 2020-06-17 10:42:20 +00:00
libopie Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libpam Don't explicitly specify c99 or gnu99 as the default is now gnu99. 2020-08-17 05:57:02 +00:00
libpathconv Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libpcap MFV r353141 (by phillip): 2019-12-21 21:01:03 +00:00
libpe
libpjdlog pkgbase: Create a FreeBSD-utilities package and make it the default one 2019-09-05 14:15:47 +00:00
libpmc PMC: remove now orphaned PMC for INTEL XScale processors. 2020-12-25 15:21:53 +01:00
libpmcstat pmcstat: fix PPC kernel symbol resolution 2020-11-05 16:47:23 +00:00
libproc Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libprocstat Decode and report native eventfd descriptors from libprocstat and procstat. 2020-12-27 12:57:27 +02:00
libradius Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
libregex libregex: re-enable make check 2021-01-08 13:58:35 -06:00
librpcsec_gss Fix a few mandoc issues 2020-10-09 19:12:44 +00:00
librpcsvc Update Makefile.depend files 2019-12-11 17:37:53 +00:00
librss Update Makefile.depend files 2019-12-11 17:37:53 +00:00
librt pkgbase: Create a FreeBSD-utilities package and make it the default one 2019-09-05 14:15:47 +00:00
librtld_db librtld_db: Handle anonymous mappings below the first file mapping. 2020-06-05 18:44:14 +00:00
libsbuf Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libsdp Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libsecureboot veloader: insist on verifying .4th .lua etc 2020-08-21 00:27:06 +00:00
libsm Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details 2020-07-15 18:28:54 +00:00
libsmb
libsmdb Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details 2020-07-15 18:28:54 +00:00
libsmutil
libsqlite3 [PowerPC64LE] Pass our byte order to the sqlite3 build. 2020-09-23 02:17:44 +00:00
libssp libssp: don't compile with -fstack-protector* 2020-03-14 15:15:27 +00:00
libssp_nonshared Provide libssp based on libc 2020-01-04 20:19:25 +00:00
libstats Make use of the stats(3) framework in the TCP stack. 2019-12-02 20:58:04 +00:00
libstdbuf
libstdthreads Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libsysdecode libsysdecode: decode _UMTX_OP flags 2020-12-09 03:22:44 +00:00
libtacplus libtacplus: Remove bogus srandomdev+random 2019-12-13 05:11:34 +00:00
libtelnet
libthr libthr malloc: support recursion on thr_malloc_umtx. 2021-01-12 12:45:44 +02:00
libthread_db Remove libthr, csu, libthread_db and testfloat sparc64 specific directories. 2020-02-27 04:44:58 +00:00
libucl Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libufs Update the libufs cgget() and cgput() interfaces to have a similar 2020-09-19 22:48:30 +00:00
libugidfw Deduplicate fsid comparisons 2020-05-21 01:55:35 +00:00
libulog Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libunbound MFV r361322: 2020-05-21 21:00:46 +00:00
libusb Be bug compatible with other operating systems by allowing non-sequential 2020-12-14 11:56:16 +00:00
libusbhid USB HID descriptors may push/pop the current state to allow 2020-06-05 07:57:16 +00:00
libutil Change getlocalbase() to not allocate any heap memory 2020-12-12 11:23:52 +00:00
libveriexec Do not claim libbearssl et al are INTERNALLIB 2020-04-01 05:45:12 +00:00
libvgl Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libvmmapi Honor the disabled setting for MSI-X interrupts for passthrough devices. 2020-11-24 23:18:52 +00:00
libwrap Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libxo pkgbase: Install libxo test files in the tests package 2021-01-04 16:20:26 +01:00
liby
libypclnt Update Makefile.depend files 2019-12-11 17:37:53 +00:00
libz Generate zlib.pc from source. 2020-05-12 01:47:33 +00:00
libzstd libprivatezstd: Restrict symbol visibility similar to upstream 2021-01-03 11:26:46 -08:00
msun Avoid double output in fenv_test 2021-01-29 09:29:27 +00:00
ncurses ncurses: only keep the version with widechar support 2021-01-05 14:01:32 +01:00
ofed Remove remaining uses of ${COMPILER_FEATURES:Mc++11} 2021-01-19 21:37:36 +00:00
tests
Makefile build: remove LIBPTHREAD/LIBTHR build options 2021-01-22 12:33:27 -06:00
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00