diff options
author | Elliott Hughes <enh@google.com> | 2018-05-08 15:07:43 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2018-05-09 12:25:12 -0700 |
commit | e332f658e0ee33a799b204640b2d79590500b039 (patch) | |
tree | ebf1acc64da70be14e81b050c788969c73463724 /benchmarks | |
parent | 0364a4b44671abd016e10b0cf3a0927ae2f77592 (diff) | |
download | android_bionic-e332f658e0ee33a799b204640b2d79590500b039.tar.gz android_bionic-e332f658e0ee33a799b204640b2d79590500b039.tar.bz2 android_bionic-e332f658e0ee33a799b204640b2d79590500b039.zip |
Switch to FreeBSD's actual sincos.
Before:
BM_math_sin_fast 48 ns 48 ns 14693053
BM_math_sincos 61 ns 61 ns 11470219
After:
BM_math_sin_fast 48 ns 48 ns 14725120
BM_math_sincos 43 ns 43 ns 16329843
Bug: N/A
Test: ran tests, benchmarks
Change-Id: I8693c64135233c0641af5302c38748f47ac76737
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/math_benchmark.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/benchmarks/math_benchmark.cpp b/benchmarks/math_benchmark.cpp index 2e54202e6..ccb35557d 100644 --- a/benchmarks/math_benchmark.cpp +++ b/benchmarks/math_benchmark.cpp @@ -220,3 +220,13 @@ static void BM_math_fabs(benchmark::State& state) { SetLabel(state); } BIONIC_BENCHMARK_WITH_ARG(BM_math_fabs, "MATH_COMMON"); + +static void BM_math_sincos(benchmark::State& state) { + d = 1.0; + while (state.KeepRunning()) { + double s, c; + sincos(d, &s, &c); + d += s + c; + } +} +BIONIC_BENCHMARK(BM_math_sincos); |