| 1 |
# Benchmarking |
| 2 |
|
| 3 |
## Installation |
| 4 |
|
| 5 |
1. Install [google/benchmark](https://github.com/google/benchmark). |
| 6 |
For example, using homebrew on a Mac: `brew install google-benchmark`. |
| 7 |
2. Build and run the benchmarking executables: |
| 8 |
|
| 9 |
```bash |
| 10 |
cmake .. -DBENCHMARK_ENABLED=ON |
| 11 |
ninja benchmark/runtime/benchmark_cost_functions |
| 12 |
``` |
| 13 |
|
| 14 |
To reduce the variance, consider setting up your system appropriately [following these instructions](https://github.com/google/benchmark/blob/main/docs/reducing_variance.md). |
| 15 |
|
| 16 |
## Running the benchmarks |
| 17 |
|
| 18 |
Cost functions: |
| 19 |
|
| 20 |
```bash |
| 21 |
./benchmark/runtime/benchmark_cost_functions --benchmark_display_aggregates_only=true --benchmark_repetitions=50 |
| 22 |
``` |