[2/2] benchtests: Add sqrtf benchmark
Checks
| Context |
Check |
Description |
| redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
| redhat-pt-bot/TryBot-32bit |
fail
|
Patch caused testsuite regressions
|
| linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Add representative sqrtf inputs and disable compiler builtin expansion so the benchmark measures the libc implementation.
Signed-off-by: Julian Zhu <jz531210@gmail.com>
---
benchtests/Makefile | 2 ++
benchtests/sqrtf-inputs | 10 ++++++++++
2 files changed, 12 insertions(+)
create mode 100644 benchtests/sqrtf-inputs
Comments
Hi Julian,
your input file is quite short. Many input files have at least 1000 entries,
to avoid that branch prediction perturbs results.
Paul
@@ -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
new file mode 100644
@@ -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