/
githubmirror
/
glibc
ОбзорДокументацияВойти
/
githubmirror
/
glibc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
glibc/
benchtests/
..
libmvec

benchtests: Add benchtests for rsqrt

8 месяцев назад
scripts

Update copyright dates with scripts/update-copyrights

7 месяцев назад
strcoll-inputs

htl: Drop pthread-functions infrastructure

9 месяцев назад
Makefile

Update copyright dates with scripts/update-copyrights

7 месяцев назад
README

benchtests: Add fclose benchmark

2 года назад
acos-inputs

Remove obsolete comments/name from acos-inputs, since slow path was removed.

5 лет назад
acosf-inputs

benchtests: Add acosf benchmark

2 года назад
acosh-inputs

benchtests: Add workload for acosh

год назад
acoshf-inputs

benchtests: Add acoshf benchmark

2 года назад
acospi-inputs

add missing benchmark files for several C23 binary64 functions

год назад
acospif-inputs

benchtests: Add acospif

год назад
asin-inputs

Remove obsolete comments/name from several benchtest input files.

5 лет назад
asinf-inputs

benchtests: Add asinf benchmark

2 года назад
asinh-inputs

benchtests: Add workload for asinh

год назад
asinhf-inputs

benchtests: Add asinhf benchmark

2 года назад
asinpi-inputs

add missing benchmark files for several C23 binary64 functions

год назад
asinpif-inputs

benchtests: Add asinpif

год назад
atan-inputs

Remove obsolete comments/name from several benchtest input files.

5 лет назад
atan2-inputs

replace atan2-inputs with more meaningful inputs

год назад
atan2f-inputs

benchtests: Add atan2f benchmark

2 года назад
atan2pi-inputs

add missing benchmark files for several C23 binary64 functions

год назад
atan2pif-inputs

benchtests: Add atan2pif

год назад
atanf-inputs

benchtests: Add atanf benchmark

2 года назад
atanh-inputs

x86_64: Add atanh with FMA

год назад
atanhf-inputs

benchtests: Add atanhf benchmark

2 года назад
atanpi-inputs

add missing benchmark files for several C23 binary64 functions

год назад
atanpif-inputs

benchtests: Add atanpif

год назад
bench-arc4random.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-bsearch.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-bzero-large.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-bzero.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-calloc-simple.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-calloc-tcache.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-calloc-thread.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-dl-elf-hash.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-dl-new-hash.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-fclose.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-hash-funcs-kernel.h

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-hash-funcs.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-libmvec-skeleton.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-malloc-simple.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-malloc-tcache.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-malloc-thread.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-math-inlines.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memccpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memchr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memcmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memcmpeq.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memcpy-large.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memcpy-random.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memcpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memmem.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memmove-large.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memmove.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-mempcpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memrchr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memset-large.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memset-random.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memset-zero-large.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memset-zero.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-memset.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-nss-hash.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-lock-base.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-locks.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-mutex-lock.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-mutex-trylock-base.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-mutex-trylock-recursive-throughput.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-mutex-trylock-throughput.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-mutex-trylock.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-spin-lock.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-pthread-spin-trylock.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-random-lock.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-rawmemchr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-skeleton.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-stpcpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-stpcpy_chk.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-stpncpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcasecmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcasestr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcat.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strchr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strchrnul.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcoll.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcpy_chk.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strcspn.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-string.h

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strlen-random.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strlen.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strncasecmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strncat.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strncmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strncpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strnlen.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strpbrk.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strrchr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strsep.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strspn.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strstr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strtod.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-strtok.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-timing-type.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-timing.h

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-util.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-util.h

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcpcpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcpncpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcrtomb.c

benchtests: Add wcrtomb microbenchmark

4 года назад
bench-wcscat.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcschr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcschrnul.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcscmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcscpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcscspn.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcslen.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcsncat.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcsncmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcsncpy.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcsnlen.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcspbrk.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcsrchr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wcsspn.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wmemchr.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wmemcmp.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
bench-wmemset.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
cbrt-inputs

add workload traces for missing functions (double format)

5 лет назад
cbrtf-inputs

benchtests: Add cbrtf benchmark

2 года назад
cbrtl-inputs

add workload traces for cbrtl

5 лет назад
ceil-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
ceilf-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
cos-inputs

Remove obsolete comments/name from several benchtest input files.

5 лет назад
cosf-inputs

benchtests: Add workload name for cosf

4 года назад
cosh-inputs

benchmark inputs for sinh and cosh

13 лет назад
coshf-inputs

benchtests: Add coshf benchmark

2 года назад
cospi-inputs

add missing benchmark files for several C23 binary64 functions

год назад
cospif-inputs

benchtests: Add cospif

год назад
erf-inputs

benchtests: Add workload directive for erf and erfc

год назад
erfc-inputs

benchtests: Add workload directive for erf and erfc

год назад
erfcf-inputs

benchtests: Add erfcf benchmark

2 года назад
erff-inputs

benchtests: Add erff benchmark

2 года назад
exp-inputs

benchtests: Add "workload" traces for exp

6 лет назад
exp10-inputs

add workload traces for missing functions (double format)

5 лет назад
exp10f-inputs

benchtests: Fix name of exp10f benchmark variant

5 лет назад
exp10m1-inputs

add missing benchmark files for several C23 binary64 functions

год назад
exp10m1f-inputs

benchtests: Add exp10m1f benchmark

2 года назад
exp2-inputs

benchmark inputs for exp2, log2, log and tan

13 лет назад
exp2f-inputs

Add exp2f and log2f benchmark trace

9 лет назад
exp2m1-inputs

add missing benchmark files for several C23 binary64 functions

год назад
exp2m1f-inputs

benchtests: Add exp2m1f benchmark

2 года назад
expf-inputs

Add expf trace

9 лет назад
expf128-inputs

benchtests: Run _Float128 tests only on architectures that support it

6 лет назад
expl-inputs

added benchtest inputs for expl

год назад
expm1-inputs

add workload traces for missing functions (double format)

5 лет назад
expm1f-inputs

benchtests: Add expm1f benchmark

2 года назад
ffs-inputs

benchtests: Add benchtests for ffs and ffsll

12 лет назад
ffsll-inputs

benchtests: Add benchtests for ffs and ffsll

12 лет назад
floor-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
floorf-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
fma-inputs

benchtests: Add fma benchtests

9 месяцев назад
fmaf-inputs

benchtests: Add fmaf benchtests

9 месяцев назад
fmal-inputs

added benchtest inputs for fmal

год назад
fmax-inputs

benchtests: Add fmax/fmin benchmarks

10 лет назад
fmaxf-inputs

benchtests: Add fmaxf/fminf benchmarks

10 лет назад
fmin-inputs

benchtests: Add fmax/fmin benchmarks

10 лет назад
fminf-inputs

benchtests: Add fmaxf/fminf benchmarks

10 лет назад
fmod-inputs

benchtests: Improve fmod benchmark

10 месяцев назад
fmodf-inputs

benchtests: Improve fmod benchmark

10 месяцев назад
frexp-inputs

benchtests: Add benchmarks for frexp functions

9 месяцев назад
frexpf-inputs

benchtests: Add benchmarks for frexp functions

9 месяцев назад
frexpl-inputs

benchtests: Add benchmarks for frexp functions

9 месяцев назад
hypot-inputs

benchtests: Make hypot input random

5 лет назад
hypotf-inputs

benchtests: Add hypotf

5 лет назад
ilogb-inputs

benchtests: Add ilogb* tests

5 лет назад
ilogbf-inputs

benchtests: Add ilogb* tests

5 лет назад
ilogbf128-inputs

benchtests: Use __f128 on ilogbf128-inputs constants

9 месяцев назад
inet_ntop_ipv4-inputs

benchtests: Add IPv4 inet_ntop benchmark

год назад
inet_ntop_ipv4-source.c

benchtests: Add IPv4 inet_ntop benchmark

год назад
inet_ntop_ipv6-inputs

benchtests: Add IPv6 inet_ntop benchmark

год назад
inet_ntop_ipv6-source.c

benchtests: Add IPv6 inet_ntop benchmark

год назад
isfinite-inputs

benchtests: Add isnan/isinf/isfinite benchmark

7 лет назад
isinf-inputs

benchtests: Add isnan/isinf/isfinite benchmark

7 лет назад
isnan-inputs

benchtests: Add isnan/isinf/isfinite benchmark

7 лет назад
j0-inputs

add workload traces for missing functions (double format)

5 лет назад
j1-inputs

add workload traces for missing functions (double format)

5 лет назад
json-lib.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
json-lib.h

Update copyright dates with scripts/update-copyrights

7 месяцев назад
lgamma-inputs

benchtests: Add workload for lgamma

год назад
lgammaf-inputs

benchtests: Add lgammaf benchmark

2 года назад
lgammaf_r-inputs

benchtests: Add lgammaf_r benchmark

10 месяцев назад
llrint-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
llrintf-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
log-inputs

benchmark inputs for exp2, log2, log and tan

13 лет назад
log10-inputs

add workload traces for missing functions (double format)

5 лет назад
log10f-inputs

benchtests: Add log10f benchmark

2 года назад
log10p1-inputs

add missing benchmark files for several C23 binary64 functions

год назад
log10p1f-inputs

benchtests: Add log10p1f benchmark

2 года назад
log1p-inputs

add workload traces for missing functions (double format)

5 лет назад
log1pf-inputs

benchtests: Add log1p benchmark

2 года назад
log2-inputs

benchmark inputs for exp2, log2, log and tan

13 лет назад
log2f-inputs

Add exp2f and log2f benchmark trace

9 лет назад
log2l-inputs

added benchtest inputs for log2l

год назад
log2p1-inputs

add missing benchmark files for several C23 binary64 functions

год назад
log2p1f-inputs

benchtests: Add log2p1f benchmark

2 года назад
logb-inputs

benchtests: Add logb{f} benchmark

7 лет назад
logbf-inputs

benchtests: Add logb{f} benchmark

7 лет назад
logf-inputs

Add logf trace

9 лет назад
lrint-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
lrintf-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
modf-inputs

benchtests: Improve modf benchtest

год назад
modff-inputs

benchtests: Add modff benchtest

год назад
nearbyint-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
nearbyintf-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
pow-inputs

Remove obsolete comments/name from several benchtest input files.

5 лет назад
powf-inputs

Add powf trace

9 лет назад
powf128-inputs

benchtests: Run _Float128 tests only on architectures that support it

6 лет назад
powl-inputs

added benchtest inputs for powl

год назад
pthread_once-inputs

benchtests: Add pthread_once common-case test.

12 лет назад
pthread_once-source.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
remainder-inputs

benchtests: Add remainder benchtest

10 месяцев назад
remainderf-inputs

benchtests: Add remainderf benchtest

10 месяцев назад
rint-inputs

Add more directives to benchmark input files

13 лет назад
rintf-inputs

benchtests: Add more benchtests for rounding functions.

2 года назад
roundeven-inputs

Add benchtests for roundeven and roundevenf.

6 лет назад
roundevenf-inputs

Add benchtests for roundeven and roundevenf.

6 лет назад
rsqrt-inputs

added benchmark inputs for rsqrtf and rsqrt

год назад
rsqrtf-inputs

added benchmark inputs for rsqrtf and rsqrt

год назад
sin-inputs

Remove obsolete comments/name from several benchtest input files.

5 лет назад
sincos-inputs

benchtests: Add inputs from sin and cos to sincos

11 лет назад
sincosf-inputs

benchtests: Add workload name for sincosf

4 года назад
sinf-inputs

benchtests: Add "workload" traces for sinf

6 лет назад
sinf128-inputs

benchtests: Run _Float128 tests only on architectures that support it

6 лет назад
sinh-inputs

x86_64: Add sinh with FMA

год назад
sinhf-inputs

benchtests: Add sinhf benchmark

2 года назад
sinpi-inputs

add missing benchmark files for several C23 binary64 functions

год назад
sinpif-inputs

benchtests: Add sinpif

год назад
sprintf-inputs

Add sprintf benchmark.

11 лет назад
sprintf-source.c

Add sprintf benchmark.

11 лет назад
sqrt-inputs

Benchmark test for sqrt function.

13 лет назад
tan-inputs

Remove obsolete comments/name from several benchtest input files.

5 лет назад
tanf-inputs

benchtests: Add tanf benchmark

2 года назад
tanh-inputs

benchtests: Remove wrong snippet from 360cce0

год назад
tanhf-inputs

benchtests: Add tanhf benchmark

2 года назад
tanpi-inputs

add missing benchmark files for several C23 binary64 functions

год назад
tanpif-inputs

benchtests: Add tanpif

год назад
tgamma-inputs

benchtests: Add workload directive for tgamma

год назад
tgammaf-inputs

benchtests: Add workload for tgammaf-inputs

год назад
thread_create-inputs

nptl: Invert the mmap/mprotect logic on allocated stacks (BZ#18988)

9 лет назад
thread_create-source.c

Update copyright dates with scripts/update-copyrights

7 месяцев назад
trunc-inputs

Add benchtests for trunc and truncf.

9 лет назад
truncf-inputs

Add benchtests for trunc and truncf.

9 лет назад
y0-inputs

add workload traces for missing functions (double format)

5 лет назад
y1-inputs

add workload traces for missing functions (double format)

5 лет назад
README
Using the glibc microbenchmark suite
====================================
 
The glibc microbenchmark suite automatically generates code for specified
functions, builds and calls them repeatedly for given inputs to give some
basic performance properties of the function.
 
Running the benchmark:
=====================
 
The benchmark needs python 2.7 or later in addition to the
dependencies required to build the GNU C Library. One may run the
benchmark by invoking make as follows:
 
$ make bench
 
This runs each function for 10 seconds and appends its output to
benchtests/bench.out. To ensure that the tests are rebuilt, one could run:
 
$ make bench-clean
 
The duration of each test can be configured setting the BENCH_DURATION variable
in the call to make. One should run `make bench-clean' before changing
BENCH_DURATION.
 
$ make BENCH_DURATION=1 bench
 
The benchmark suite does function call measurements using architecture-specific
high precision timing instructions whenever available. When such support is
not available, it uses clock_gettime (CLOCK_MONOTONIC). One can force the
benchmark to use clock_gettime by invoking make as follows:
 
$ make USE_CLOCK_GETTIME=1 bench
 
Again, one must run `make bench-clean' before changing the measurement method.
 
On x86 processors, RDTSCP instruction provides more precise timing data
than RDTSC instruction. All x86 processors since 2010 support RDTSCP
instruction. One can force the benchmark to use RDTSCP by invoking make
as follows:
 
$ make USE_RDTSCP=1 bench
 
One must run `make bench-clean' before changing the measurement method.
 
Running benchmarks on another target:
====================================
 
If the target where you want to run benchmarks is not capable of building the
code or you're cross-building, you could build and execute the benchmark in
separate steps. On the build system run:
 
$ make bench-build
 
and then copy the source and build directories to the target and run the
benchmarks from the build directory as usual:
 
$ make bench
 
make sure the copy preserves timestamps by using either rsync or scp -p
otherwise the above command may try to build the benchmark again. Benchmarks
that require generated code to be executed during the build are skipped when
cross-building.
 
Building benchmarks as static executables:
=========================================
 
To build benchmarks as static executables, on the build system, run:
 
$ make STATIC-BENCHTESTS=yes bench-build
 
You can copy benchmark executables to another machine and run them
without copying the source nor build directories.
 
Running subsets of benchmarks:
==============================
 
To run only a subset of benchmarks, one may invoke make as follows
 
$ make bench BENCHSET="bench-pthread bench-math malloc-thread"
 
where BENCHSET may be a space-separated list of the following values:
 
bench-math
bench-pthread
bench-string
hash-benchset
malloc-thread
math-benchset
stdio-benchset
stdio-common-benchset
stdlib-benchset
string-benchset
wcsmbs-benchset
 
Adding a function to benchtests:
===============================
 
If the name of the function is `foo', then the following procedure should allow
one to add `foo' to the bench tests:
 
- Append the function name to the bench variable in the Makefile.
 
- Make a file called `foo-inputs` to provide the definition and input for the
function. The file should have some directives telling the parser script
about the function and then one input per line. Directives are lines that
have a special meaning for the parser and they begin with two hashes '##'.
The following directives are recognized:
 
- args: This should be assigned a colon separated list of types of the input
arguments. This directive may be skipped if the function does not take any
inputs. One may identify output arguments by nesting them in <>. The
generator will create variables to get outputs from the calling function.
- ret: This should be assigned the type that the function returns. This
directive may be skipped if the function does not return a value.
- includes: This should be assigned a comma-separated list of headers that
need to be included to provide declarations for the function and types it
may need (specifically, this includes using "#include <header>").
- include-sources: This should be assigned a comma-separated list of source
files that need to be included to provide definitions of global variables
and functions (specifically, this includes using "#include "source").
See pthread_once-inputs and pthreads_once-source.c for an example of how
to use this to benchmark a function that needs state across several calls.
- init: Name of an initializer function to call to initialize the benchtest.
- name: See following section for instructions on how to use this directive.
 
Lines beginning with a single hash '#' are treated as comments. See
pow-inputs for an example of an input file.
 
Multiple execution units per function:
=====================================
 
Some functions have distinct performance characteristics for different input
domains and it may be necessary to measure those separately. For example, some
math functions perform computations at different levels of precision (64-bit vs
240-bit vs 768-bit) and mixing them does not give a very useful picture of the
performance of these functions. One could separate inputs for these domains in
the same file by using the `name' directive that looks something like this:
 
##name: 240bits
 
All inputs after the ##name: 240bits directive and until the next `name'
directive (or the end of file) are part of the "240bits" benchmark and
will be output separately in benchtests/bench.out. See the pow-inputs file
for an example of what such a partitioned input file would look like.
 
It is also possible to measure latency and reciprocal throughput of a
(partial) trace extracted from a real workload. In this case the whole trace
is iterated over multiple times rather than repeating every input multiple
times. This can be done via:
 
##name: workload-<name>
 
where <name> is simply used to distinguish between different traces in the
same file. To create such a trace, you can simply extract using printf()
values uses for a specific application, or generate random values in some
interval. See the expf-inputs file for an example of this workload mechanism.
 
Benchmark Sets:
==============
 
In addition to standard benchmarking of functions, one may also generate
custom outputs for a set of functions. This is currently used by string
function benchmarks where the aim is to compare performance between
implementations at various alignments and for various sizes.
 
To add a benchset for `foo':
 
- Add `foo' to the benchset variable.
- Write your bench-foo.c that prints out the measurements to stdout.
- On execution, a bench-foo.out is created in $(objpfx) with the contents of
stdout.
 
Reading String Benchmark Results:
================================
 
Some of the string benchmark results are now in JSON to make it easier to read
in scripts. Use the benchtests/compare_strings.py script to show the results
in a tabular format, generate graphs and more. Run
 
benchtests/scripts/compare_strings.py -h
 
for usage information.