Add inner iteration loops to amortize CodSpeed instrumentation overhead

Sub-microsecond benchmarks are dominated by the ~60ns per-iteration
valgrind start/stop cost in CodSpeed simulation mode. Add kInnerIterations
(1000) inner loops to all fast benchmarks so the actual work dominates.
Move DoNotOptimize calls outside inner loops to prevent artificial overhead.

Also address review feedback:
- Use tokenless CodSpeed (public repo, no CODSPEED_TOKEN needed)
- Fix warning message to show component-specific path
- Fix stray ". :" in error message
- Verify pinned SHA on re-runs to prevent stale checkouts
This commit is contained in:
J. Nick Koston
2026-03-16 23:32:49 -10:00
parent 5b073ca520
commit dd52c91290
8 changed files with 187 additions and 54 deletions
-1
View File
@@ -340,7 +340,6 @@ jobs:
uses: CodSpeedHQ/action@281164b0f014a4e7badd2c02cecad9b595b70537 # v4
with:
run: ${{ steps.build.outputs.binary }}
token: ${{ secrets.CODSPEED_TOKEN }}
mode: simulation
clang-tidy-single: