[PATCH 2/2] benchtests: Add sqrtf benchmark
Julian Zhu <[email protected]> Fri, 31 Jul 2026 13:32:59 +0800
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <[email protected]> |
Add representative sqrtf inputs and disable compiler builtin expansion so the benchmark measures the libc implementation. Signed-off-by: Julian Zhu <[email protected]> --- benchtests/Makefile | 2 ++ benchtests/sqrtf-inputs | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 benchtests/sqrtf-inputs diff --git a/benchtests/Makefile b/benchtests/Makefile index a288c6ca74..6c21cddcbf 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -150,6 +150,7 @@ bench-math := \ sinpi \ sinpif \ sqrt \ + sqrtf \ tan \ tanf \ tanh \ @@ -356,6 +357,7 @@ endif CFLAGS-bench-ffs.c += -fno-builtin CFLAGS-bench-ffsll.c += -fno-builtin CFLAGS-bench-sqrt.c += -fno-builtin +CFLAGS-bench-sqrtf.c += -fno-builtin CFLAGS-bench-fmin.c += -fno-builtin CFLAGS-bench-fminf.c += -fno-builtin CFLAGS-bench-fma.c += -fno-builtin diff --git a/benchtests/sqrtf-inputs b/benchtests/sqrtf-inputs new file mode 100644 index 0000000000..675c462740 --- /dev/null +++ b/benchtests/sqrtf-inputs @@ -0,0 +1,10 @@ +## args: float +## ret: float +## includes: math.h +0.25 +0.75 +2.0 +4.0 +2209.0 +6642.25 +15190.5625 -- 2.53.0