about summary refs log tree commit diff
path: root/benchtests/bench-strnlen.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Bump up the runtime for "short" benchmarksAnton Youdkevitch2019-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Some benchmarks with a very short runtime show significantly different results across runs on Aarch64 - up to tens of percents. Increasing the runtime to 100ms+ makes the deviation under 5%. Tested on Aarch64 and x86-64. Reviewed-by: Carlos O'Donell <carlos@redhat.com> * benchtests/bench-memccpy.c: Replace INNER_LOOP_ITERS with INNER_LOOP_ITERS_LARGE. * benchtests/bench-memchr.c: Likewise. * benchtests/bench-rawmemchr.c: Likewise. * benchtests/bench-strcat.c: Likewise. * benchtests/bench-strchr.c: Likewise. * benchtests/bench-string.h: Likewise. * benchtests/bench-strlen.c: Likewise. * benchtests/bench-strncpy.c: Likewise. * benchtests/bench-strnlen.c: Likewise.
* Improve string benchtestsWilco Dijkstra2019-04-091-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Replace slow byte-oriented tests in several string benchmarks with the generic implementations from the string/ directory so the comparisons are more realistic and useful. * benchtests/bench-stpcpy.c (SIMPLE_STPCPY): Remove function. (generic_stpcpy): New function. * benchtests/bench-stpncpy.c (SIMPLE_STPNCPY): Remove function. (generic_stpncpy): New function. * benchtests/bench-strcat.c (SIMPLE_STRCAT): Remove function. (generic_strcat): New function. * benchtests/bench-strcpy.c (SIMPLE_STRCPY): Remove function. (generic_strcpy): New function. * benchtests/bench-strncat.c (SIMPLE_STRNCAT): Remove function. (STUPID_STRNCAT): Remove function. (generic_strncat): New function. * benchtests/bench-strncpy.c (SIMPLE_STRNCPY): Remove function. (STUPID_STRNCPY): Remove function. (generic_strncpy): New function. * benchtests/bench-strnlen.c (SIMPLE_STRNLEN): Remove function. (generic_strnlen): New function. (memchr_strnlen): New function. * benchtests/bench-strlen.c (generic_strlen): Define for WIDE. (memchr_strlen): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Refactor string benchtestsWilco Dijkstra2018-12-211-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor string benchtests by moving duplicated defines into bench-string.h. * benchtests/bench-memchr.c: Cleanup defines. * benchtests/bench-memcmp.c: Likewise. * benchtests/bench-memset.c: Likewise. * benchtests/bench-memset-large.c: Likewise. * benchtests/bench-memset-walk.c: Likewise. * benchtests/bench-stpcpy.c: Likewise. * benchtests/bench-stpncpy.c: Likewise. * benchtests/bench-strcat.c: Likewise. * benchtests/bench-strchr.c: Likewise. * benchtests/bench-strcmp.c: Likewise. * benchtests/bench-strcpy.c: Likewise. * benchtests/bench-strcspn.c: Likewise. * benchtests/bench-string.h: Likewise. * benchtests/bench-strlen.c: Likewise. * benchtests/bench-strncat.c: Likewise. * benchtests/bench-strncmp.c: Likewise. * benchtests/bench-strncpy.c: Likewise. * benchtests/bench-strnlen.c: Likewise. * benchtests/bench-strpbrk.c: Likewise. * benchtests/bench-strrchr.c: Likewise. * benchtests/bench-strspn.c: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Adjust benchtests to new support library.Adhemerval Zanella2016-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch basically replaces the test-skeleton.c inclusion by support/test-driver.c and also minor adjustments in bench-string.h. Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. * benchtests/bench-string.h (TEST_FUNCTION): Use name without parenthesis. (CMDLINE_PROCESS): Define using function instead of macro. * benchtests/bench-memccpy.c: Include <support/test-driver.c> instead of test-skeleton. * benchtests/bench-memchr.c: Likewise. * benchtests/bench-memcmp.c: Likewise. * benchtests/bench-memcpy-large.c: Likewise. * benchtests/bench-memcpy.c: Likewise. * benchtests/bench-memmem.c: Likewise. * benchtests/bench-memmove-large.c: Likewise. * benchtests/bench-memmove.c: Likewise. * benchtests/bench-memset-large.c: Likewise. * benchtests/bench-memset.c: Likewise. * benchtests/bench-rawmemchr.c: Likewise. * benchtests/bench-strcasecmp.c: Likewise. * benchtests/bench-strcasestr.c: Likewise. * benchtests/bench-strcat.c: Likewise. * benchtests/bench-strchr.c: Likewise. * benchtests/bench-strcmp.c: Likewise. * benchtests/bench-strcpy.c: Likewise. * benchtests/bench-strcpy_chk.c: Likewise. * benchtests/bench-strlen.c: Likewise. * benchtests/bench-strncasecmp.c: Likewise. * benchtests/bench-strncmp.c: Likewise. * benchtests/bench-strncpy.c: Likewise. * benchtests/bench-strnlen.c: Likewise. * benchtests/bench-strpbrk.c: Likewise. * benchtests/bench-strrchr.c: Likewise. * benchtests/bench-strsep.c: Likewise. * benchtests/bench-strspn.c: Likewise. * benchtests/bench-strstr.c: Likewise. * benchtests/bench-strtok.c: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* S390: Optimize strnlen and wcsnlen.Stefan Liebler2015-08-261-25/+46
| | | | | | | | | | | | | | | | | | | | | | | | | This patch provides optimized versions of strnlen and wcsnlen with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strnlen-c.c: New File. * sysdeps/s390/multiarch/strnlen-vx.S: Likewise. * sysdeps/s390/multiarch/strnlen.c: Likewise. * sysdeps/s390/multiarch/wcsnlen-c.c: Likewise. * sysdeps/s390/multiarch/wcsnlen-vx.S: Likewise. * sysdeps/s390/multiarch/wcsnlen.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strnlen and wcsnlen functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strnlen, wcsnlen. * wcsmbs/wcsnlen.c: Use WCSNLEN if defined. * string/test-strnlen.c: Add wcsnlen support. * wcsmbs/test-wcsnlen.c: New File. * wcsmbs/Makefile (strop-tests): Add wcsnlen. * benchtests/bench-strnlen.c: Add wcsnlen support. * benchtests/bench-wcsnlen.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsnlen.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* benchtests: Switch string benchmarks to use bench-timing.h.Will Newton2013-09-041-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the string benchmarks to using bench-timing.h instead of hp-timing.h directly. This allows the string benchmarks to be run usefully on architectures such as ARM that do not have support for hp-timing.h. In order to do this the tests have been changed from timing each individual call and picking the lowest execution time recorded to timing a number of calls and taking the mean execution time. ChangeLog: 2013-09-04 Will Newton <will.newton@linaro.org> * benchtests/bench-timing.h (TIMING_PRINT_MEAN): New macro. * benchtests/bench-string.h: Include bench-timing.h instead of including hp-timing.h directly. (INNER_LOOP_ITERS): New define. (HP_TIMING_BEST): Delete macro. (test_init): Remove call to HP_TIMING_DIFF_INIT. * benchtests/bench-memccpy.c: Use bench-timing.h macros instead of hp-timing.h macros. * benchtests/bench-memchr.c: Likewise. * benchtests/bench-memcmp.c: Likewise. * benchtests/bench-memcpy.c: Likewise. * benchtests/bench-memmem.c: Likewise. * benchtests/bench-memmove.c: Likewise. * benchtests/bench-memset.c: Likewise. * benchtests/bench-rawmemchr.c: Likewise. * benchtests/bench-strcasecmp.c: Likewise. * benchtests/bench-strcasestr.c: Likewise. * benchtests/bench-strcat.c: Likewise. * benchtests/bench-strchr.c: Likewise. * benchtests/bench-strcmp.c: Likewise. * benchtests/bench-strcpy.c: Likewise. * benchtests/bench-strcpy_chk.c: Likewise. * benchtests/bench-strlen.c: Likewise. * benchtests/bench-strncasecmp.c: Likewise. * benchtests/bench-strncat.c: Likewise. * benchtests/bench-strncmp.c: Likewise. * benchtests/bench-strncpy.c: Likewise. * benchtests/bench-strnlen.c: Likewise. * benchtests/bench-strpbrk.c: Likewise. * benchtests/bench-strrchr.c: Likewise. * benchtests/bench-strspn.c: Likewise. * benchtests/bench-strstr.c: Likewise.
* Copy over string performance tests into benchtestsSiddhesh Poyarekar2013-06-111-0/+139
Copy over already existing string performance tests into benchtests. Bits not related to performance measurements have been omitted.