]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
benchtests: Improve fmod benchmark
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Sun, 5 Oct 2025 13:30:26 +0000 (10:30 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 8 Oct 2025 13:42:22 +0000 (10:42 -0300)
The gcc implements fmod as a built-in for x86, so disable it to
benchmark the C implementation.

Also, make fmod and fmodf use the workload directive to measure
the reciprocal throughput.

benchtests/Makefile
benchtests/fmod-inputs
benchtests/fmodf-inputs

index 8c5704ae1fcd61f1d1a76fc6033ecd4a13ce83fc..b4d92b1c04d6910e3c463b574b50a28c57227edf 100644 (file)
@@ -345,6 +345,8 @@ CFLAGS-bench-fmax.c += -fno-builtin
 CFLAGS-bench-fmaxf.c += -fno-builtin
 CFLAGS-bench-trunc.c += -fno-builtin
 CFLAGS-bench-truncf.c += -fno-builtin
+CFLAGS-bench-fmod.c += -fno-builtin
+CFLAGS-bench-fmodf.c += -fno-builtin
 CFLAGS-bench-remainder.c += -fno-builtin
 CFLAGS-bench-remainderf.c += -fno-builtin
 CFLAGS-bench-roundeven.c += -fno-builtin
index 6f75ea122eeb0a109667a86754236b2eeb8300f0..37fc387f0453c277ea52cb0ff03d4d4f8b7c34ac 100644 (file)
@@ -1,7 +1,7 @@
 ## args: double:double
 ## ret: double
 ## includes: math.h
-## name: subnormals
+## name: workload-subnormals
 0x0.3212f5b8c8c16p-1022, 0x0.cded0a47373e9p-1022
 0x0.809c23acfa7ddp-1022, 0x0.7f63dc5305822p-1022
 0x0.360cedf5115cdp-1022, 0x0.c9f3120aeea32p-1022
 0x0.bc8e4bc0faeb9p-1022, 0x0.4371b43f05146p-1022
 0x0.f4f1f63404c96p-1022, 0x0.0b0e09cbfb369p-1022
 0x0.05bee37594244p-1022, 0x0.fa411c8a6bdbbp-1022
-## name: normal
+## name: workload-normal
 0x1.be99ad6933c76p-740, 0x1.41665296cc389p+741
 0x1.87b8527e7cddep+690, 0x1.7847ad8183221p-689
 0x1.1d86cb84ad5fcp-944, 0x1.e279347b52a03p+945
 0x1.24dace6eba432p+319, 0x1.db25319145bcdp-318
 0x1.3fc7522fb956cp+578, 0x1.c038add046a93p-577
 0x1.a96e0d311a68ep-975, 0x1.5691f2cee5971p+976
-## name: close-exponents
+## name: workload-close-exponents
 0x1.88c3696801c18p-8, 0x1.773c9697fe3e8p+7
 0x1.7c4e20fb600cp-2, 0x1.83b1df049ff4p+1
 0x1.59a3ed1a02abep-6, 0x1.a65c12e5fd542p+5
index be16a88ea58615a7853f812b2003579dbe68df26..9be1056ee2c16a9a449ac9d8ef413bc82444d3b7 100644 (file)
@@ -1,7 +1,7 @@
 ## args: float:float
 ## ret: float
 ## includes: math.h
-## name: subnormals
+## name: workload-subnormals
 0x1.3a3e6p-127, 0x1.8b8338p-128
 0x1.03a6cp-127, 0x1.f8b278p-128
 0x1.b8faap-127, 0x1.1c157p-129
 0x1.b4274p-128, 0x1.25ec5cp-127
 0x1.7c2bp-128, 0x1.41ea7cp-127
 0x1.90c28p-128, 0x1.379ebcp-127
-## name: normal
+## name: workload-normal
 0x1.c423f2p-11, 0x1.3bdc0cp+12
 0x1.c78066p+108, 0x1.387f98p-107
 0x1.454806p+93, 0x1.bab7f8p-92
 0x1.a6a72ep+32, 0x1.5958dp-31
 0x1.8cf0fcp-113, 0x1.730f02p+114
 0x1.dcbf66p-102, 0x1.234098p+103
-## name: close-exponents
+## name: workload-close-exponents
 0x1.956f8p-6, 0x1.6a908p+5
 0x1.6f04cp+2, 0x1.90fb4p-3
 0x1.1e4bcp+2, 0x1.e1b44p-3