tinybench
npmv6.1.6TypeScriptπ A simple, tiny and lightweight benchmarking library!
Safe to adopt
Yes β tinybench scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 4 days ago. 40 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 4 days ago. 40 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 96 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT β permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph β downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding tinybench to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=20.0.0
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the tinybench README.
import { Bench } from 'tinybench'
const bench = new Bench({ name: 'simple benchmark', time: 100 })
bench
.add('faster task', () => {
console.log('I am faster')
})
.add('slower task', async () => {
await new Promise(resolve => setTimeout(resolve, 1)) // we wait 1ms :)
console.log('I am slower')
})
await bench.run()tinybench vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| tinybenchthis page | 0 | 16 | MIT | 4 days ago |
| fflate | 53.5M | 1 | MIT | 1 day ago |
| tinyexec | 0 | 8 | MIT | 1 day ago |
| tinyglobby | 0 | 8 | MIT | 1 day ago |
| @open-draft/logger | 0 | 1 | MIT | 1 day ago |
Used by
Popular packages that depend on tinybench.
An implementation of the WHATWG URL Standard's URL API and parsing machinery
Encode & decode XML and HTML entities with ease & speed
Next generation testing framework powered by Vite
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
The fast, flexible & elegant library for parsing and manipulating HTML and XML.
Offers a async require.resolve function. It's highly configurable.
A fast and minimal alternative to globby and fast-glob
A JavaScript implementation of many web standards
A CSS selector engine.
Fastest Snappy compression library in Node.js
Measure the difference between two strings using the Levenshtein distance algorithm
Snapshotable JavaScript runtime via WebAssembly. QuickJS-NG compiled to WASM with snapshot/restore support.
Stringify your JSON at max speed
Fake HTTP injection library
Just a little module for plugins.
Wrapper library for directory and file watching.
Relationship graph
Dependencies (left) and dependents (right) of tinybench.
Frequently installed together
TypeScript definitions for node
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
A JavaScript implementation of many web standards
Native-ESM powered web dev build tool
Check whether a given string matches the `PotentialCustomElementName` production as defined in the HTML Standard.
A drop-in replacement for fs, making various improvements.
A tool set for CSS: fast detailed parser (CSS β AST), walker (AST traversal), generator (AST β CSS) and lexer (validation and matching) based on specs and browser implementations
Just a little module for plugins.
ECMAScript parser
Next generation testing framework powered by Vite
Lexes ES modules returning their import/export metadata
Release history
24 releases in the last two years, typically about 8 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 6.1.6latest | 4 days ago | 96 KB | MIT |
| 6.1.5 | 5 days ago | 96 KB | MIT |
| 6.1.4 | 12 days ago | 96 KB | MIT |
| 6.1.3 | 1 month ago | 96 KB | MIT |
| 6.1.2 | 1 month ago | 96 KB | MIT |
| 6.1.1 | 1 month ago | 95 KB | MIT |
| 6.1.0 | 1 month ago | 95 KB | MIT |
| 6.0.3 | 1 month ago | 76 KB | MIT |
| 6.0.2 | 3 months ago | 76 KB | MIT |
| 6.0.1 | 4 months ago | 70 KB | MIT |
| 6.0.0 | 9 months ago | 73 KB | MIT |
| 6.0.0-rc.1 | 9 months ago | 73 KB | MIT |
| 6.0.0-beta.4 | 9 months ago | 73 KB | MIT |
| 6.0.0-beta.3 | 9 months ago | 73 KB | MIT |
| 6.0.0-beta.2 | 9 months ago | 73 KB | MIT |
Overview
tinybench is an npm package that π A simple, tiny and lightweight benchmarking library!. It has 16 known dependents in the graph. The latest version is 6.1.6, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need π A simple, tiny and lightweight benchmarking library! and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Zero runtime dependencies β minimal footprint.
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use tinybench?
Yes β tinybench scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 4 days ago. 40 releases in the last 2 years.
How do I install tinybench?
Run `npm install tinybench` to add tinybench to your npm project.
What license is tinybench released under?
tinybench is distributed under the MIT license.
How popular is tinybench?
npm does not publish download counts. Within PackageGraph's crawl, 16 known packages depend on tinybench.
Is tinybench still maintained?
The most recent release of tinybench (v6.1.6) was published 4 days ago.
Does tinybench run install scripts?
No. tinybench does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.