Compare Tinybench results with other tools
mainWhen comparing Tinybench results to other benchmarking tools, expect differences due to:
- Timing APIs: Differences in resolution (e.g.,
Date.now()vsprocess.hrtime.bigint()). - Methodology: Tinybench collects many samples over a configurable
timewindow and performs statistical analysis, whereas some tools may only measure a single iteration. - Statistics: Tinybench reports mean, median (p50), p75, p99, standard deviation, and margin of error. Other tools may use different aggregation methods (e.g., geometric mean).
- Warmup: Tinybench performs a separate warmup phase by default (
warmup: true) that is excluded from statistics. Disabling it (warmup: false) includes JIT warmup costs in the results.
Best Practice: Focus on relative performance (is A faster than B?) rather than absolute numbers, and ensure both tests run on the same machine and environment.