summaryrefslogtreecommitdiff
path: root/libc/benchtests
diff options
context:
space:
mode:
Diffstat (limited to 'libc/benchtests')
-rw-r--r--libc/benchtests/Makefile81
-rw-r--r--libc/benchtests/atan-inputs6
-rw-r--r--libc/benchtests/bench-modf.c15
-rw-r--r--libc/benchtests/bench-skeleton.c101
-rw-r--r--libc/benchtests/bench-timing.h72
-rw-r--r--libc/benchtests/cos-inputs8
-rw-r--r--libc/benchtests/exp-inputs4
-rw-r--r--libc/benchtests/pow-inputs4
-rw-r--r--libc/benchtests/sin-inputs10
-rw-r--r--libc/benchtests/slowatan-inputs3
-rw-r--r--libc/benchtests/slowatan.c19
-rw-r--r--libc/benchtests/slowcos-inputs5
-rw-r--r--libc/benchtests/slowcos.c19
-rw-r--r--libc/benchtests/slowexp-inputs1
-rw-r--r--libc/benchtests/slowexp.c19
-rw-r--r--libc/benchtests/slowpow-inputs1
-rw-r--r--libc/benchtests/slowpow.c19
-rw-r--r--libc/benchtests/slowsin-inputs7
-rw-r--r--libc/benchtests/slowsin.c19
-rw-r--r--libc/benchtests/slowtan-inputs1
-rw-r--r--libc/benchtests/slowtan.c19
-rw-r--r--libc/benchtests/tan-inputs4
22 files changed, 202 insertions, 235 deletions
diff --git a/libc/benchtests/Makefile b/libc/benchtests/Makefile
index 387fde441..861839013 100644
--- a/libc/benchtests/Makefile
+++ b/libc/benchtests/Makefile
@@ -23,12 +23,6 @@
# - Append the function name to the bench variable
-# - Define foo-ITER with the number of iterations you want to run. Keep it
-# high enough that the overhead of clock_gettime is only a small fraction of
-# the total run time of the test. A good idea would be to keep the run time
-# of each test at around 10 seconds for x86_64. That is just a guideline,
-# since some scenarios may require higher run times.
-
# - Define foo-ARGLIST as a colon separated list of types of the input
# arguments. Use `void` if function does not take any inputs. Put in quotes
# if the input argument is a pointer, e.g.:
@@ -45,92 +39,36 @@
# See pow-inputs for an example.
subdir := benchtests
-bench := exp pow rint sin cos tan atan modf \
- slowexp slowpow slowsin slowcos slowtan slowatan
+bench := exp pow rint sin cos tan atan modf
-# exp function fast path: sysdeps/ieee754/dbl-64/e_exp.c
-exp-ITER = 5e8
exp-ARGLIST = double
exp-RET = double
LDFLAGS-bench-exp = -lm
-# pow function fast path: sysdeps/ieee754/dbl-64/e_pow.c
-pow-ITER = 2e8
pow-ARGLIST = double:double
pow-RET = double
LDFLAGS-bench-pow = -lm
-rint-ITER = 250000000
rint-ARGLIST = double
rint-RET = double
LDFLAGS-bench-rint = -lm
-# exp function slowest path: sysdeps/ieee754/dbl-64/mpexp.c
-slowexp-ITER = 3e5
-slowexp-ARGLIST = double
-slowexp-RET = double
-slowexp-INCLUDE = slowexp.c
-LDFLAGS-bench-slowexp = -lm
-
-# sin function fast path: sysdeps/ieee754/dbl-64/s_sin.c
-sin-ITER = 3e9
sin-ARGLIST = double
sin-RET = double
LDFLAGS-bench-sin = -lm
-# cos function fast path: sysdeps/ieee754/dbl-64/s_sin.c
-cos-ITER = 3e9
cos-ARGLIST = double
cos-RET = double
LDFLAGS-bench-cos = -lm
-# tan function fast path: sysdeps/ieee754/dbl-64/s_tan.c
-tan-ITER = 3e9
tan-ARGLIST = double
tan-RET = double
LDFLAGS-bench-tan = -lm
-# atan function fast path: sysdeps/ieee754/dbl-64/s_atan.c
-atan-ITER = 6e9
atan-ARGLIST = double
atan-RET = double
LDFLAGS-bench-atan = -lm
-# pow function slowest path: sysdeps/ieee754/dbl-64/slowpow.c
-slowpow-ITER = 1e5
-slowpow-ARGLIST = double:double
-slowpow-RET = double
-slowpow-INCLUDE = slowpow.c
-LDFLAGS-bench-slowpow = -lm
-
-# sin function slowest path: sysdeps/ieee754/dbl-64/sincos32.c
-slowsin-ITER = 3e7
-slowsin-ARGLIST = double
-slowsin-RET = double
-slowsin-INCLUDE = slowsin.c
-LDFLAGS-bench-slowsin = -lm
-
-# cos function slowest path: sysdeps/ieee754/dbl-64/sincos32.c
-slowcos-ITER = 3e7
-slowcos-ARGLIST = double
-slowcos-RET = double
-slowcos-INCLUDE = slowcos.c
-LDFLAGS-bench-slowcos = -lm
-
-# tan function slowest path: sysdeps/ieee754/dbl-64/mptan.c
-slowtan-ITER = 3e7
-slowtan-ARGLIST = double
-slowtan-RET = double
-slowtan-INCLUDE = slowtan.c
-LDFLAGS-bench-slowtan = -lm
-
-# atan function slowest path: sysdeps/ieee754/dbl-64/mpatan.c
-slowatan-ITER = 3e8
-slowatan-ARGLIST = double
-slowatan-RET = double
-slowatan-INCLUDE = slowatan.c
-LDFLAGS-bench-slowatan = -lm
-
# Rules to build and execute the benchmarks. Do not put any benchmark
@@ -141,13 +79,26 @@ include ../Rules
binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
+# The default duration: 10 seconds.
+ifndef BENCH_DURATION
+BENCH_DURATION := 10
+endif
+
+CPPFLAGS-nonlib = -DDURATION=$(BENCH_DURATION)
+
+# Use clock_gettime to measure performance of functions. The default is to use
+# HP_TIMING if it is available.
+ifdef USE_CLOCK_GETTIME
+CPPFLAGS-nonlib += -DUSE_CLOCK_GETTIME
+endif
+
# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
# for all these modules.
cpp-srcs-left := $(binaries-bench:=.c)
lib := nonlib
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
-bench-deps := bench-skeleton.c Makefile
+bench-deps := bench-skeleton.c bench-timing.h Makefile
run-bench = $(test-wrapper-env) \
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
@@ -176,5 +127,5 @@ $(objpfx)bench-%.c: %-inputs $(bench-deps)
cat $($*-INCLUDE); \
fi; \
$(..)scripts/bench.pl $(patsubst %-inputs,%,$<) \
- $($*-ITER) $($*-ARGLIST) $($*-RET); } > $@-tmp
+ $($*-ARGLIST) $($*-RET); } > $@-tmp
mv -f $@-tmp $@
diff --git a/libc/benchtests/atan-inputs b/libc/benchtests/atan-inputs
index c685db3b9..4a2cf3aca 100644
--- a/libc/benchtests/atan-inputs
+++ b/libc/benchtests/atan-inputs
@@ -1,3 +1,9 @@
0x1.000000c5cba86p0
0x1.000001883003ap0
0x1.00000dfb2b674p0
+# atan slowest path at 768 bits
+# Implemented in sysdeps/ieee754/dbl-64/mpatan.c
+## name: 768bits
+0x1.000000c5cba87p0
+0x1.000001883003bp0
+0x1.00000dfb2b675p0
diff --git a/libc/benchtests/bench-modf.c b/libc/benchtests/bench-modf.c
index 975a29f19..2b50665b7 100644
--- a/libc/benchtests/bench-modf.c
+++ b/libc/benchtests/bench-modf.c
@@ -17,23 +17,28 @@
extern double modf (double, double *);
-#define CALL_BENCH_FUNC(j, i) modf ( in[j].arg0, &i);
+#define CALL_BENCH_FUNC(j, i) modf (in[j].arg0, &i);
struct args
{
- double arg0;
+ volatile double arg0;
} in[] =
{
{ 42.42 },
{ -42.42 }
};
-#define NUM_SAMPLES (sizeof (in) / sizeof (struct args))
+#define NUM_VARIANTS 1
+#define NUM_SAMPLES(v) (sizeof (in) / sizeof (struct args))
static volatile double ret = 0.0;
-#define BENCH_FUNC(j) ({double iptr; ret = CALL_BENCH_FUNC (j, iptr);})
+#define BENCH_FUNC(v, j) \
+({ \
+ double iptr; \
+ ret = CALL_BENCH_FUNC (j, iptr); \
+})
-#define ITER 250000000
#define FUNCNAME "modf"
+#define VARIANT(v) FUNCNAME "()"
#include "bench-skeleton.c"
diff --git a/libc/benchtests/bench-skeleton.c b/libc/benchtests/bench-skeleton.c
index 13f986d81..4e3a50704 100644
--- a/libc/benchtests/bench-skeleton.c
+++ b/libc/benchtests/bench-skeleton.c
@@ -21,55 +21,90 @@
#include <stdio.h>
#include <time.h>
#include <inttypes.h>
+#include "bench-timing.h"
+volatile unsigned int dontoptimize = 0;
+
+void
+startup (void)
+{
+ /* This loop should cause CPU to switch to maximal freqency.
+ This makes subsequent measurement more accurate. We need a side effect
+ to prevent the loop being deleted by compiler.
+ This should be enough to cause CPU to speed up and it is simpler than
+ running loop for constant time. This is used when user does not have root
+ access to set a constant freqency. */
+ for (int k = 0; k < 10000000; k++)
+ dontoptimize += 23 * dontoptimize + 2;
+}
+
+#define TIMESPEC_AFTER(a, b) \
+ (((a).tv_sec == (b).tv_sec) ? \
+ ((a).tv_nsec > (b).tv_nsec) : \
+ ((a).tv_sec > (b).tv_sec))
int
main (int argc, char **argv)
{
- unsigned long i, j, k;
- uint64_t total = 0, max = 0, min = 0x7fffffffffffffff;
- struct timespec start, end;
+ unsigned long i, k;
+ struct timespec runtime;
+ timing_t start, end;
+
+ startup();
- memset (&start, 0, sizeof (start));
- memset (&end, 0, sizeof (end));
+ memset (&runtime, 0, sizeof (runtime));
- clock_getres (CLOCK_PROCESS_CPUTIME_ID, &start);
+ unsigned long iters;
- /* Measure 1000 times the resolution of the clock. So for a 1ns resolution
- clock, we measure 1000 iterations of the function call at a time.
- Measurements close to the minimum clock resolution won't make much sense,
- but it's better than having nothing at all. */
- unsigned long iters = 1000 * start.tv_nsec;
- unsigned long total_iters = ITER / iters;
+ TIMING_INIT (iters);
- for (i = 0; i < NUM_SAMPLES; i++)
+ for (int v = 0; v < NUM_VARIANTS; v++)
{
- for (j = 0; j < total_iters; j ++)
+ /* Run for approximately DURATION seconds. */
+ clock_gettime (CLOCK_MONOTONIC_RAW, &runtime);
+ runtime.tv_sec += DURATION;
+
+ double d_total_i = 0;
+ timing_t total = 0, max = 0, min = 0x7fffffffffffffff;
+ while (1)
{
- clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &start);
- for (k = 0; k < iters; k++)
- BENCH_FUNC(i);
- clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &end);
+ for (i = 0; i < NUM_SAMPLES (v); i++)
+ {
+ uint64_t cur;
+ TIMING_NOW (start);
+ for (k = 0; k < iters; k++)
+ BENCH_FUNC (v, i);
+ TIMING_NOW (end);
- uint64_t cur = (end.tv_nsec - start.tv_nsec
- + ((end.tv_sec - start.tv_sec)
- * (uint64_t) 1000000000));
+ TIMING_DIFF (cur, start, end);
- if (cur > max)
- max = cur;
+ if (cur > max)
+ max = cur;
- if (cur < min)
- min = cur;
+ if (cur < min)
+ min = cur;
- total += cur;
+ TIMING_ACCUM (total, cur);
+
+ d_total_i += iters;
+ }
+ struct timespec curtime;
+
+ memset (&curtime, 0, sizeof (curtime));
+ clock_gettime (CLOCK_MONOTONIC_RAW, &curtime);
+ if (TIMESPEC_AFTER (curtime, runtime))
+ goto done;
}
- }
- double d_total_s = total * 1e-9;
- double d_iters = iters;
- double d_total_i = (double)ITER * NUM_SAMPLES;
- printf (FUNCNAME ": ITERS:%g: TOTAL:%gs, MAX:%gns, MIN:%gns, %g iter/s\n",
- d_total_i, d_total_s, max / d_iters, min / d_iters,
- d_total_i / d_total_s);
+ double d_total_s;
+ double d_iters;
+
+ done:
+ d_total_s = total;
+ d_iters = iters;
+
+ TIMING_PRINT_STATS (VARIANT (v), d_total_s, d_iters, d_total_i, max,
+ min);
+ }
return 0;
}
diff --git a/libc/benchtests/bench-timing.h b/libc/benchtests/bench-timing.h
new file mode 100644
index 000000000..264d4b8ba
--- /dev/null
+++ b/libc/benchtests/bench-timing.h
@@ -0,0 +1,72 @@
+/* Define timing macros.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <hp-timing.h>
+#include <stdint.h>
+
+#if HP_TIMING_AVAIL && !defined USE_CLOCK_GETTIME
+# define GL(x) _##x
+# define GLRO(x) _##x
+hp_timing_t _dl_hp_timing_overhead;
+typedef hp_timing_t timing_t;
+
+# define TIMING_INIT(iters) \
+({ \
+ HP_TIMING_DIFF_INIT(); \
+ (iters) = 1000; \
+})
+
+# define TIMING_NOW(var) HP_TIMING_NOW (var)
+# define TIMING_DIFF(diff, start, end) HP_TIMING_DIFF ((diff), (start), (end))
+# define TIMING_ACCUM(sum, diff) HP_TIMING_ACCUM_NT ((sum), (diff))
+
+# define TIMING_PRINT_STATS(func, d_total_s, d_iters, d_total_i, max, min) \
+ printf ("%s: ITERS:%g: TOTAL:%gMcy, MAX:%gcy, MIN:%gcy, %g calls/Mcy\n", \
+ (func), (d_total_i), (d_total_s) * 1e-6, (max) / (d_iters), \
+ (min) / (d_iters), 1e6 * (d_total_i) / (d_total_s));
+
+#else
+typedef uint64_t timing_t;
+
+/* Measure 1000 times the resolution of the clock. So for a 1ns
+ resolution clock, we measure 1000 iterations of the function call at a
+ time. Measurements close to the minimum clock resolution won't make
+ much sense, but it's better than having nothing at all. */
+# define TIMING_INIT(iters) \
+({ \
+ struct timespec start; \
+ clock_getres (CLOCK_PROCESS_CPUTIME_ID, &start); \
+ (iters) = 1000 * start.tv_nsec; \
+})
+
+# define TIMING_NOW(var) \
+({ \
+ struct timespec tv; \
+ clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &tv); \
+ (var) = (uint64_t) (tv.tv_nsec + (uint64_t) 1000000000 * tv.tv_sec); \
+})
+
+# define TIMING_DIFF(diff, start, end) (diff) = (end) - (start)
+# define TIMING_ACCUM(sum, diff) (sum) += (diff)
+
+# define TIMING_PRINT_STATS(func, d_total_s, d_iters, d_total_i, max, min) \
+ printf ("%s: ITERS:%g: TOTAL:%gs, MAX:%gns, MIN:%gns, %g iter/s\n", \
+ (func), (d_total_i), (d_total_s) * 1e-9, (max) / (d_iters), \
+ (min) / (d_iters), 1e9 * (d_total_i) / (d_total_s))
+
+#endif
diff --git a/libc/benchtests/cos-inputs b/libc/benchtests/cos-inputs
index 98f4122aa..82a40609c 100644
--- a/libc/benchtests/cos-inputs
+++ b/libc/benchtests/cos-inputs
@@ -3,3 +3,11 @@
0x1.00000162a932ap0
0x1.000002d452a11p0
0x1.000005bc7d86cp0
+# cos slow path at 768 bits
+# Implemented in sysdeps/ieee754/dbl-64/sincos32.c
+## name: 768bits
+0x1.000000cf4a2a2p0
+0x1.0000010b239a9p0
+0x1.00000162a932bp0
+0x1.000002d452a10p0
+0x1.000005bc7d86dp0
diff --git a/libc/benchtests/exp-inputs b/libc/benchtests/exp-inputs
index d81cc0710..e9d33a3d1 100644
--- a/libc/benchtests/exp-inputs
+++ b/libc/benchtests/exp-inputs
@@ -1 +1,5 @@
42
+# Slowest path with computation in 768 bit precision.
+# Implemented in: sysdeps/ieee754/dbl-64/mpexp.c
+## name: 768bits
+708.00096423260981737257679924368858
diff --git a/libc/benchtests/pow-inputs b/libc/benchtests/pow-inputs
index 2f7cc03b5..dad65059a 100644
--- a/libc/benchtests/pow-inputs
+++ b/libc/benchtests/pow-inputs
@@ -1 +1,5 @@
42.0, 42.0
+# pow slowest path at 768 bits
+# Implemented in sysdeps/ieee754/dbl-64/slowpow.c
+## name: 768bits
+1.0000000000000020, 1.5
diff --git a/libc/benchtests/sin-inputs b/libc/benchtests/sin-inputs
index 620cea8d9..08192d8f0 100644
--- a/libc/benchtests/sin-inputs
+++ b/libc/benchtests/sin-inputs
@@ -5,3 +5,13 @@
4.0
4.7
5.9
+# sin slowest path at 768 bits
+# Implemented in sysdeps/ieee754/dbl-64/sincos32.c
+## name: 768bits
+0.93340582292648832662962377071381
+2.3328432680770916363144351635128
+3.7439477503636453548097051680088
+3.9225160069792437411706487182528
+4.0711651639931289992091478779912
+4.7858438478542097982426639646292
+5.9840767662578002727968851104379
diff --git a/libc/benchtests/slowatan-inputs b/libc/benchtests/slowatan-inputs
deleted file mode 100644
index e557a3cb2..000000000
--- a/libc/benchtests/slowatan-inputs
+++ /dev/null
@@ -1,3 +0,0 @@
-0x1.000000c5cba87p0
-0x1.000001883003bp0
-0x1.00000dfb2b675p0
diff --git a/libc/benchtests/slowatan.c b/libc/benchtests/slowatan.c
deleted file mode 100644
index 9a11d30bd..000000000
--- a/libc/benchtests/slowatan.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Define slowatan.
- Copyright (C) 2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#define slowatan atan
diff --git a/libc/benchtests/slowcos-inputs b/libc/benchtests/slowcos-inputs
deleted file mode 100644
index b7eb23536..000000000
--- a/libc/benchtests/slowcos-inputs
+++ /dev/null
@@ -1,5 +0,0 @@
-0x1.000000cf4a2a2p0
-0x1.0000010b239a9p0
-0x1.00000162a932bp0
-0x1.000002d452a10p0
-0x1.000005bc7d86dp0
diff --git a/libc/benchtests/slowcos.c b/libc/benchtests/slowcos.c
deleted file mode 100644
index 9f56234af..000000000
--- a/libc/benchtests/slowcos.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Define slowcos.
- Copyright (C) 2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#define slowcos cos
diff --git a/libc/benchtests/slowexp-inputs b/libc/benchtests/slowexp-inputs
deleted file mode 100644
index a2086baa8..000000000
--- a/libc/benchtests/slowexp-inputs
+++ /dev/null
@@ -1 +0,0 @@
-708.00096423260981737257679924368858
diff --git a/libc/benchtests/slowexp.c b/libc/benchtests/slowexp.c
deleted file mode 100644
index 92ac5e9b4..000000000
--- a/libc/benchtests/slowexp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Define slowexp.
- Copyright (C) 2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#define slowexp exp
diff --git a/libc/benchtests/slowpow-inputs b/libc/benchtests/slowpow-inputs
deleted file mode 100644
index dbb1270b7..000000000
--- a/libc/benchtests/slowpow-inputs
+++ /dev/null
@@ -1 +0,0 @@
-1.0000000000000020, 1.5
diff --git a/libc/benchtests/slowpow.c b/libc/benchtests/slowpow.c
deleted file mode 100644
index 08f436d2a..000000000
--- a/libc/benchtests/slowpow.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Define slowpow.
- Copyright (C) 2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#define slowpow pow
diff --git a/libc/benchtests/slowsin-inputs b/libc/benchtests/slowsin-inputs
deleted file mode 100644
index 39daf80b3..000000000
--- a/libc/benchtests/slowsin-inputs
+++ /dev/null
@@ -1,7 +0,0 @@
-0.93340582292648832662962377071381
-2.3328432680770916363144351635128
-3.7439477503636453548097051680088
-3.9225160069792437411706487182528
-4.0711651639931289992091478779912
-4.7858438478542097982426639646292
-5.9840767662578002727968851104379
diff --git a/libc/benchtests/slowsin.c b/libc/benchtests/slowsin.c
deleted file mode 100644
index b6809bdd7..000000000
--- a/libc/benchtests/slowsin.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Define slowsin.
- Copyright (C) 2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#define slowsin sin
diff --git a/libc/benchtests/slowtan-inputs b/libc/benchtests/slowtan-inputs
deleted file mode 100644
index 74a7eab3f..000000000
--- a/libc/benchtests/slowtan-inputs
+++ /dev/null
@@ -1 +0,0 @@
-0x1.dffffffffff1fp-22
diff --git a/libc/benchtests/slowtan.c b/libc/benchtests/slowtan.c
deleted file mode 100644
index 583f16f0d..000000000
--- a/libc/benchtests/slowtan.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Define slowtan.
- Copyright (C) 2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#define slowtan tan
diff --git a/libc/benchtests/tan-inputs b/libc/benchtests/tan-inputs
index 4369d7577..629414fc7 100644
--- a/libc/benchtests/tan-inputs
+++ b/libc/benchtests/tan-inputs
@@ -1 +1,5 @@
0x1.dffffffffff1ep-22
+# tan slowest path at 768 bits
+# Implemented in sysdeps/ieee754/dbl-64/mptan.c
+## name: 768bits
+0x1.dffffffffff1fp-22