https://github.com/rnburn/cmath-benchmark
https://github.com/rnburn/cmath-benchmark
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rnburn/cmath-benchmark
- Owner: rnburn
- Created: 2020-12-27T00:10:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-27T00:18:08.000Z (over 4 years ago)
- Last Synced: 2025-01-20T02:49:27.307Z (4 months ago)
- Language: Assembly
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```