From: Adhemerval Zanella Date: Sun, 5 Oct 2025 13:30:26 +0000 (-0300) Subject: benchtests: Improve fmod benchmark X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b8eb82845c9d9f5b475c7b885b8439b473a5fa2;p=thirdparty%2Fglibc.git benchtests: Improve fmod benchmark 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. --- diff --git a/benchtests/Makefile b/benchtests/Makefile index 8c5704ae1f..b4d92b1c04 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -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 diff --git a/benchtests/fmod-inputs b/benchtests/fmod-inputs index 6f75ea122e..37fc387f04 100644 --- a/benchtests/fmod-inputs +++ b/benchtests/fmod-inputs @@ -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 @@ -130,7 +130,7 @@ 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 @@ -1155,7 +1155,7 @@ 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 diff --git a/benchtests/fmodf-inputs b/benchtests/fmodf-inputs index be16a88ea5..9be1056ee2 100644 --- a/benchtests/fmodf-inputs +++ b/benchtests/fmodf-inputs @@ -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 @@ -130,7 +130,7 @@ 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 @@ -1155,7 +1155,7 @@ 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