Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A benchmark for our trigonometric functions and a few performance improvements #4111

Merged
merged 9 commits into from
Oct 7, 2024

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Oct 7, 2024

  • Support for angles in [-π/4, π/4].
  • Support for uninitialized DoublePrecision objects.
  • Improved computation of the table index.

Benchmark:

Run on (48 X 3793 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x24)
  L1 Instruction 32 KiB (x24)
  L2 Unified 512 KiB (x24)
  L3 Unified 32768 KiB (x4)
------------------------------------------------------------------------------------------------------
Benchmark                                                            Time             CPU   Iterations
------------------------------------------------------------------------------------------------------
BM_EvaluateElementaryFunction<Metric::Latency, std::sin>          7.26 ns         7.25 ns    112000000 cycles: 27.5162
BM_EvaluateElementaryFunction<Metric::Throughput, std::sin>       2.12 ns         2.13 ns    344616000 cycles: 8.00978
BM_EvaluateElementaryFunction<Metric::Latency, cr_sin>            31.9 ns         31.5 ns     21334000 cycles: 120.947
BM_EvaluateElementaryFunction<Metric::Throughput, cr_sin>         20.8 ns         20.9 ns     34462000 cycles: 78.7098
BM_EvaluateElementaryFunction<Metric::Latency, Sin>               11.2 ns         11.2 ns     64000000 cycles: 42.4374
BM_EvaluateElementaryFunction<Metric::Throughput, Sin>            3.59 ns         3.61 ns    194783000 cycles: 13.5883
BM_EvaluateElementaryFunction<Metric::Latency, std::cos>          8.14 ns         8.02 ns     89600000 cycles: 30.8504
BM_EvaluateElementaryFunction<Metric::Throughput, std::cos>       2.12 ns         2.13 ns    344616000 cycles: 8.00876
BM_EvaluateElementaryFunction<Metric::Latency, cr_cos>            35.3 ns         35.3 ns     20364000 cycles: 133.698
BM_EvaluateElementaryFunction<Metric::Throughput, cr_cos>         21.7 ns         21.5 ns     32000000 cycles: 82.2311
BM_EvaluateElementaryFunction<Metric::Latency, Cos>               11.0 ns         11.0 ns     64000000 cycles: 41.5094
BM_EvaluateElementaryFunction<Metric::Throughput, Cos>            3.28 ns         3.30 ns    213334000 cycles: 12.4005

#1760.

@pleroy pleroy merged commit 2a14d1c into mockingbirdnest:master Oct 7, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants