rnburn / cmath-benchmark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmath-benchmark

Benchmark for std::sqrt.

Builld

./ci/run_docker.sh
make

Test

./a.out

outputs:

sqrt1
1	1
2	1.41421
3	1.73205
4	2
-1	-nan
errno = 33
sqrt2
1	1
2	1.41421
3	1.73205
4	2
-1	-nan
errno = 0

Benchmark

./benchmark

outputs:

Running ./benchmark
Run on (6 X 2600 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x6)
  L1 Instruction 32 KiB (x6)
  L2 Unified 256 KiB (x6)
  L3 Unified 9216 KiB (x6)
Load Average: 0.17, 0.07, 0.05
-----------------------------------------------------------
Benchmark                 Time             CPU   Iterations
-----------------------------------------------------------
BM_Sqrt1/1000000    4984457 ns      4946631 ns          115
BM_Sqrt2/1000000    1195070 ns      1192078 ns          553

About


Languages

Language:Assembly 49.7%Language:C++ 26.0%Language:Shell 15.5%Language:Makefile 7.2%Language:Dockerfile 1.6%