Node.js Micro-benchmarking Suite

JSON →
library 0.14.0 ·javascript
verified May 27, 2026

Bench-node is a powerful Node.js module specifically designed for micro-benchmarking JavaScript code blocks, accurately measuring operations per second (ops/sec). Its current stable version is 0.14.0, and it maintains an active development pace with frequent minor releases every few weeks to months, indicating robust maintenance. A primary differentiator of `bench-node` is its explicit use of V8 deoptimization (via `%NeverOptimizeFunction`) to ensure that benchmarked code is not aggressively optimized away by the V8 engine. While this approach yields highly stable and reproducible results for micro-benchmarks, users should be aware that these "accurate" measurements might not perfectly reflect "realistic" performance in a fully optimized production environment. To further assist developers, the library includes an opt-in Dead Code Elimination (DCE) detection plugin that warns if benchmarked code is being optimized out, although enabling it disables V8 deoptimization. Additionally, `bench-node` offers statistical significance testing (Welch's t-test) to evaluate if observed performance differences are statistically meaningful, a crucial feature for benchmarking in high-variance environments. It provides a rich set of built-in reporters (text, chart, HTML, JSON, CSV, pretty) for result visualization and ships with TypeScript types for enhanced developer experience. Other features include support for setup/teardown routines, execution in worker threads for isolation, and both operations and time-based benchmarking modes.

total hits 19
actors 7 distinct systems
last hit 5d ago MetaBot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France