Commit 6474469
authored
perf(benchmarks): add ttl_cache microbench (#238)
Summary
- Add a ttl_cache microbenchmark to track cached call overhead with a
frozen timer.
Rationale
- Freezing the cache timer keeps the benchmark in the cache-hit path
even on slower CI, yielding stable results.
Details
- New `benchmarks/test_cache_benchmarks.py` adds a ttl_cache microbench
using a frozen timer function.
- Tests: `python setup.py build_ext --inplace` (mypy-compiled
extensions; verified `evmspec/_new.cpython-314-x86_64-linux-gnu.so`),
`python -m pytest benchmarks/`.1 parent e540176 commit 6474469
1 file changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments