Skip to content

Commit 018e50b

Browse files
committed
added how it works section
1 parent 5ed37d9 commit 018e50b

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/docs/optimizing-with-codeflash/benchmarking.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sidebar_position: 4
33
---
4-
# Benchmarks
4+
# Using Benchmarks
55

66
Codeflash is able the determine the impact of an optimization on predefined benchmarks, when used in benchmark mode.
77

@@ -69,3 +69,23 @@ Codeflash will then calculate the impact (if any) of any optimization on the per
6969

7070

7171

72+
## How it works
73+
74+
1. Codeflash identifies benchmarks in the benchmarks-root directory.
75+
76+
77+
2. The benchmarks are run so that runtime statistics and information can be recorded.
78+
79+
80+
3. Replay tests are generated so the performance of optimization candidates on the exact inputs used in the benchmarks can be measured.
81+
82+
83+
4. If an optimization candidate is verified to be correct, the speedup of the optimization is calculated for each benchmark.
84+
85+
86+
5. Codeflash then reports the impact of the optimization on each benchmark.
87+
88+
89+
Using Codeflash with benchmarks is a great way to find optimizations that really matter.
90+
91+
Codeflash is actively working on this feature and will be adding new capabilities in the near future!

0 commit comments

Comments
 (0)