{"library":"bench-node","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"0.14.0","tags":["javascript","benchmark","nodejs","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install bench-node","imports":["import { Suite } from 'bench-node';","import { textReport } from 'bench-node';","import { chartReport } from 'bench-node';"]},{"cmd":"yarn add bench-node","imports":[]},{"cmd":"pnpm add bench-node","imports":[]}],"homepage":"https://bench-node.netlify.app","github":"https://github.com/RafaelGSS/bench-node","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/bench-node","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/bench-node/compatibility"}}