Repository navigation
perf(tinybench): batch fast walltime invocations into rounds - #117
Conversation
Calibrate approximately 1 ms rounds from warmup and share the iteration count across isolated forks. Normalize latency statistics per invocation while retaining raw total time. Keep per-invocation hooks and concurrent tasks unbatched, and cover shared, forked, synchronous, and asynchronous execution.
Merging this PR will regress 12 benchmarks5 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
TLDR: Batch fast Tinybench walltime calls into approximately 1 ms rounds to reduce timer and sample-processing overhead (stacked on #101).
Local iterative Fibonacci(10), Node 24.22.1 / Tinybench 4.0.1, 1 s measurement + 100 ms warmup per process, one run per configuration:
Peak RSS of a measuring child in the two-fork run: 3,769 MiB → 71 MiB. Local smoke checks also cover Tinybench 6.2.2, lifecycle hooks, slow rounds, concurrency, fallback, and simulation.
Closes COD-4104.