aboutsummaryrefslogtreecommitdiff
path: root/benchtests/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-1/+1
2024-12-18benchtests: Add tanhf benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [-10,10]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add sinhf benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [-10,10]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add coshf benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [-10,10]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add atanhf benchmarkAdhemerval Zanella1-0/+1
The input is based on acosf one (random inputs in [-1,1]). Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add atan2f benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [-10,10]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add atanf benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [-10,10]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add asinhf benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [-10,10]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add asinf benchmarkAdhemerval Zanella1-0/+1
The input is based on acosf one (random inputs in [-1,1]). Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add acoshf benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [1,21]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-18benchtests: Add acosf benchmarkAdhemerval Zanella1-0/+1
The input is based on acos one (random inputs in [-1,1]). Reviewed-by: DJ Delorie <dj@redhat.com>
2024-12-11benchtests: Add benchmark test for bsearchKuan-Wei Chiu1-0/+1
Introduce a benchmark test for the bsearch function to evaluate its performance. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-29benchtests: Add calloc testWangyang Guo1-1/+6
Two new benchmarks related to calloc added: - bench-calloc-simple - bench-calloc-thread Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2024-11-22benchtests: Add tanf benchmarkAdhemerval Zanella1-0/+1
Random inputs in [-pi, pi]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-22benchtests: Add lgammaf benchmarkAdhemerval Zanella1-0/+1
Random inputs in the range [-20.0,20.0]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-22benchtests: Add erfcf benchmarkAdhemerval Zanella1-0/+1
It is based on binary64 erfc-inputs, with random inputs in [0,b=0x1.41bbf6p+3] where b in the smallest number such that erfcf(b) rounds to 0 (to nearest). Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-22benchtests: Add erff benchmarkAdhemerval Zanella1-0/+1
It is based on binary64 erf-inputs, with random inputs in [0,b=0x1.f5a888p+1] where b in the smallest number such that erff(b) rounds to 1 (to nearest). Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-22benchtests: Add cbrtf benchmarkAdhemerval Zanella1-0/+1
Based on binary64 benchtests, with random inputs in [1,8].
2024-11-01benchtests: Add log10p1f benchmarkAdhemerval Zanella1-0/+1
It is based on log2f data. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-01benchtests: Add log1p benchmarkAdhemerval Zanella1-0/+1
Random inputs x*2^e where x is random in [1/2,1] and e in [-29,127]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-01benchtests: Add log2p1f benchmarkAdhemerval Zanella1-0/+1
It is based on log2f data. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-01benchtests: Add log10f benchmarkAdhemerval Zanella1-0/+1
The inputs are random numbers in the form x*2^e where x is random in [0x1p-1,0x1p+0] and e in [-126,127]. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-01benchtests: Add expm1f benchmarkAdhemerval Zanella1-0/+1
The inputs are modeled based on expm1-inputs, with the range adapted to binary32 range. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-01benchtests: Add exp2m1f benchmarkAdhemerval Zanella1-0/+1
The input is based on exp2f benchmark. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-11-01benchtests: Add exp10m1f benchmarkAdhemerval Zanella1-0/+1
The input is based on exp10f benchmark. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-10-11replace tgammaf by the CORE-MATH implementationPaul Zimmermann1-0/+1
The CORE-MATH implementation is correctly rounded (for any rounding mode). This can be checked by exhaustive tests in a few minutes since there are less than 2^32 values to check against for example GNU MPFR. This patch also adds some bench values for tgammaf. Tested on x86_64 and x86 (cfarm26). With the initial GNU libc code it gave on an Intel(R) Core(TM) i7-8700: "tgammaf": { "": { "duration": 3.50188e+09, "iterations": 2e+07, "max": 602.891, "min": 65.1415, "mean": 175.094 } } With the new code: "tgammaf": { "": { "duration": 3.30825e+09, "iterations": 5e+07, "max": 211.592, "min": 32.0325, "mean": 66.1649 } } With the initial GNU libc code it gave on cfarm26 (i686): "tgammaf": { "": { "duration": 3.70505e+09, "iterations": 6e+06, "max": 2420.23, "min": 243.154, "mean": 617.509 } } With the new code: "tgammaf": { "": { "duration": 3.24497e+09, "iterations": 1.8e+07, "max": 1238.15, "min": 101.155, "mean": 180.276 } } Signed-off-by: Alexei Sibidanov <sibid@uvic.ca> Signed-off-by: Paul Zimmermann <Paul.Zimmermann@inria.fr> Changes in v2: - include <math.h> (fix the linknamespace failures) - restored original benchtests/strcoll-inputs/filelist#en_US.UTF-8 file - restored original wrapper code (math/w_tgammaf_compat.c), except for the dealing with the sign - removed the tgammaf/float entries in all libm-test-ulps files - address other comments from Joseph Myers (https://sourceware.org/pipermail/libc-alpha/2024-July/158736.html) Changes in v3: - pass NULL argument for signgam from w_tgammaf_compat.c - use of math_narrow_eval - added more comments Changes in v4: - initialize local_signgam to 0 in math/w_tgamma_template.c - replace sysdeps/ieee754/dbl-64/gamma_productf.c by dummy file Changes in v5: - do not mention local_signgam any more in math/w_tgammaf_compat.c - initialize local_signgam to 1 instead of 0 in w_tgamma_template.c and added comment Changes in v6: - pass NULL as 2nd argument of __ieee754_gammaf_r in w_tgammaf_compat.c, and check for NULL in e_gammaf_r.c Changes in v7: - added Signed-off-by line for Alexei Sibidanov (author of the code) Changes in v8: - added Signed-off-by line for Paul Zimmermann (submitted of the patch) Changes in v9: - address comments from review by Adhemerval Zanella Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-08-07benchtests: Add random memset benchmarkWilco Dijkstra1-0/+1
Add a new randomized memset test similar to bench-random-memcpy. Instead of repeating the same call to memset over and over again, it times a large number of different inputs. The distribution of memset length and alignment is based on SPEC2017 (length up to 4096 and alignment up to 64). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-06-21Benchtests: Remove broken walk benchmarksWilco Dijkstra1-5/+0
The walk benchmarks don't measure anything useful - memory is not initialized properly so doing a single walk in 32MB just measures reading the 4KB zero page for reads and clear_page overhead for writes. The memset variants don't even manage to do a walk in the 32MB region due to using incorrect pointer increments... Neither is it clear why it is walking backwards since this won't confuse modern prefetchers. If you fix the benchmark and print the bandwidth, the results are identical for all sizes larger than ~1KB since it is just testing memory bandwidth of a single 32MB block. This case is already tested by the large benchmark, so overall it doesn't seem useful to keep these. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-05-16benchtests: Add fclose benchmarkH.J. Lu1-0/+6
Measure duration of 100 fclose calls after opening 1 million FILEs. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-04-18benchtests: Add random() benchmarkWilco Dijkstra1-0/+1
Add a simple benchmark to measure the overhead of internal libc locks in the random() implementation on both single- and multi-threaded cases. This relies on the implementation of random using internal locks to access shared global data, and that the runtime uses multi-threaded locking once a thread has been created (even after it finishes). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-02-23benchtests: Add more benchtests for rounding functions.Junxian Zhu1-0/+11
This patch adds more benchtests for rounding functions. The double inputs are copied from trunc-inputs, the float inputs are copied from truncf-inputs. and the rintf is copied from rint-inputs. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-1/+1
2023-05-18benchtests: Reformat Makefile.Carlos O'Donell1-15/+32
Reflow all long lines adding comment terminators. Sort all reflowed text using scripts/sort-makefile-lines.py. No regressions running microbenchmarks. No code generation changes observed in binary artifacts. No regressions on x86_64 and i686.
2023-04-03benchtests: Add fmodf benchmarkAdhemerval Zanella Netto1-0/+1
1. Subnormals: 128 inputs. 2. Normal numbers with large exponent difference (|x/y| > 2^8): 1024 inputs between FLT_MIN and FLT_MAX; 3. Close exponents (ey >= -103 and |x/y| < 2^8): 1024 inputs with exponents between -10 and 10. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
2023-04-03benchtests: Add fmod benchmarkAdhemerval Zanella Netto1-0/+1
Add three different dataset, from random floating point numbers: 1. Subnormals: 128 inputs. 2. Normal numbers with large exponent difference (|x/y| > 2^52): 1024 inputs between DBL_MIN and DBL_MAX; 3. Close exponents (ey >= -907 and |x/y| < 2^52): 1024 inputs with exponents between -10 and 10. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
2023-01-06Update copyright dates with scripts/update-copyrightsJoseph Myers1-1/+1
2022-11-01Disable use of -fsignaling-nans if compiler does not support itAdhemerval Zanella1-3/+3
Reviewed-by: Fangrui Song <maskray@google.com>
2022-10-03Benchtests: Add bench for pthread_spin_{try}lock and mutex_trylockNoah Goldstein1-1/+9
Reuses infrastructure from previous pthread_mutex_lock benchmarks to test other performance sensitive functions.
2022-07-22benchtests: Add arc4random benchtestAdhemerval Zanella Netto1-1/+4
It shows both throughput (total bytes obtained in the test duration) and latecy for both arc4random and arc4random_buf with different sizes. Checked on x86_64-linux-gnu, aarch64-linux, and powerpc64le-linux-gnu.
2022-05-23benchtests: Add benchtests for dl_elf_hash, dl_new_hash and nss_hashNoah Goldstein1-4/+21
Benchtests are for throughput and include random / fixed size benchmarks. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2022-05-06benchtests: Add wcrtomb microbenchmarkSiddhesh Poyarekar1-0/+1
Add a simple benchmark that measures wcrtomb performance with various locales with 1-4 byte characters. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2022-04-29benchtests: Better libmvec integrationSiddhesh Poyarekar1-15/+17
Improve libmvec benchmark integration so that in future other architectures may be able to run their libmvec benchmarks as well. This now allows libmvec benchmarks to be run with `make BENCHSET=bench-math`. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2022-04-29benchtests: Add UNSUPPORTED benchmark statusSiddhesh Poyarekar1-5/+18
The libmvec benchmarks print a message indicating that a certain CPU feature is unsupported and exit prematurelyi, which breaks the JSON in bench.out. Handle this more elegantly in the bench makefile target by adding support for an UNSUPPORTED exit status (77) so that bench.out continues to have output for valid tests. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2022-04-27benchtests: Add pthread-mutex-locks benchWangyang Guo1-0/+2
Benchmark for testing pthread mutex locks performance with different threads and critical sections. The test configuration consists of 3 parts: 1. thread number 2. critical-section length 3. non-critical-section length Thread number starts from 1 and increased by 2x until num of CPU cores (nprocs). An additional over-saturation case (1.25 * nprocs) is also included. Critical-section is represented by a loop of shared do_filler(), length can be determined by the loop iters. Non-critical-section is similiar to the critical-section, except it's based on non-shared do_filler(). Currently, adaptive pthread_mutex lock is tested.
2022-03-16benchtests: Use "=" instead of ":=" [BZ #28970]H.J. Lu1-2/+4
Use "=" instead of ":=" to allow sysdeps Makefiles to add more benches to bench and benchset. This fixes BZ #28970. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
2022-02-25benchtests: Generate .d dependency files [BZ #28922]H.J. Lu1-2/+6
1. Add all .o files to extra-objs. 2. Include ../Rules after extra-objs has been set. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2022-02-23benchtests: Add benches for memset with 0 valueH.J. Lu1-0/+3
memset with zero as the value to set is by far the majority value (99%+ for Python3 and GCC). Add bench-memset-zero-large.c, bench-memset-zero-walk.c and bench-memset-zero.c to measure memset implementations for zeroing. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
2022-02-08benchtests: Add benches for bzeroH.J. Lu1-0/+3
Add bench-bzero-large.c, bench-bzero-walk.c and bench-bzero.c.
2022-02-07benchtests: Sort benches in MakefileH.J. Lu1-19/+110
Put one bench per line and sort them.
2022-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-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 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines