# tinylibs/tinybench

🔎 A simple, tiny and lightweight benchmarking library!

Repository: https://github.com/tinylibs/tinybench
Canonical: https://ross.abutalabs.com/products/tinybench
Homepage: https://tinylibs.github.io/tinybench/
Language: TypeScript
License: MIT
License Family: permissive
Topics: benchmark, performance, tinylibs, light-weight, hacktoberfest
Last push: 2026-08-26T16:12:07+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 97, longevity 100
- inputs: {"age_days": 1495, "days_push": 7, "days_rel": 23, "gap_med": 15.5, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2360, forks 57 (observed 2026-08-28T04:06:40.828563+00:00)

## What it is
Tinybench is a tiny (~10KB) JavaScript benchmarking library built on Web APIs with accurate timing via process.hrtime or performance.now. It provides statistically analyzed latency and throughput results, concurrency support, and works across multiple JS runtimes with zero dependencies.

## Use cases
- benchmark javascript functions
- compare performance of two implementations
- measure latency and throughput of code
- run microbenchmarks in node or browser
- get statistical analysis of benchmark results
- benchmark async tasks

## When to choose
- you need a lightweight, zero-dependency benchmarking library for JavaScript
- you want statistically rigorous results (std dev, margin of error, percentiles)
- you need benchmarks to run across multiple JS runtimes
- you want a simple API like bench.add() and bench.run()

## When to avoid
- you need full profiling with flame graphs or CPU sampling
- you benchmark non-JavaScript code
- you need a full benchmarking suite with CI dashboards and historical tracking

## Facets
- artifact type: library
- maturity: active
- function: benchmarking
- domain: developer-tools, performance, testing
- platform: cross-platform, cli
- tags: microbenchmarking, javascript, typescript, lightweight, web-apis, tinylibs, nodejs

## Member repositories
- tinylibs/tinybench (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.828563+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:36:13.043794+00:00, confidence not recorded.
  - readme: https://github.com/tinylibs/tinybench (fetched 2026-08-28T04:06:40.828563+00:00, sha d088aa48453f)
  - homepage: https://tinylibs.github.io/tinybench/ (fetched 2026-08-29T10:17:06.459462+00:00, sha 4274d496de9c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
