Hash :
ae72e787
Author :
Date :
2023-11-12T23:21:40
rawmemchr: speed up, particularly on CHERI * lib/rawmemchr.c (rawmemchr) [__CHERI__]: Use memchr instead of one-byte reads. This sped up a simple benchmark (rawmemchr on 100,000 bytes) by 6x on a Research Morello SoC r0p0 on CheriBSD 14. [!__CHERI__]: Use sizeof, not alignof, as better alignment should help performance a bit on some platforms. * modules/rawmemchr (Depends-on): Remove alignasof.
Description:
rawmemchr() function: Find the first occurrence of C in S.
Files:
lib/rawmemchr.c
lib/rawmemchr.valgrind
m4/rawmemchr.m4
Depends-on:
assert-h
extensions
stdint
string
configure.ac:
gl_FUNC_RAWMEMCHR
gl_CONDITIONAL([GL_COND_OBJ_RAWMEMCHR], [test $HAVE_RAWMEMCHR = 0])
AM_COND_IF([GL_COND_OBJ_RAWMEMCHR], [
gl_PREREQ_RAWMEMCHR
])
gl_STRING_MODULE_INDICATOR([rawmemchr])
Makefile.am:
if GL_COND_OBJ_RAWMEMCHR
lib_SOURCES += rawmemchr.c
endif
Include:
<string.h>
License:
LGPLv2+
Maintainer:
Eric Blake, glibc