package
This package allows you to benchmark different runtimes using popular packages operations.
npm install nodejs-package-benchmarkGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Latest published Oct 19, 2025
latest
This package allows you to benchmark different runtimes using popular packages operations.
npm i -g nodejs-package-benchmarkTo compare binaries, you can use the bench-it script.
bench-it $BINARY ["baseline"]This script allows you to compare the performance of binaries. If it's your first run, you need to generate the baseline data using:
$ bench-it ./node baselineTo compare subsequent runs, simply omit the "baseline" option:
$ bench-it ./node[!TIP] It's recommended to have
colordiffinstalled for a clearer comparison of differences.
To a pretty terminal output, run index.js
$ node --allow-natives-syntax index.js
cpu: 13th Gen Intel(R) Core(TM) i5-13600K (20 cores)
node: v20.13.1 (/home/hzk/.nvm/versions/node/v20.13.1/bin/node)
os: Linux 5.15.133.1-microsoft-standard-WSL2 x64
---------------------------------------------------------------------
babel
transform (code=true ast=true): 147.1 (15 samples)
transform (code=false): 150.4 (16 samples)
dotenv
config: 64.39K (6440 samples)
lodash
.chunk: 19.62M (1961973 samples)
.groupBy: 6.303M (630542 samples)
.includes: 18.38M (1837801 samples)
.orderBy: 1.737M (173672 samples)
moment
format (full): 878.8K (87908 samples)
format: 839.3K (83928 samples)
fromNow (YYYYMMDD): 153.4K (15339 samples)
subtract (10): 288.7K (28871 samples)
pinojs
info (10x): 243.7K (24686 samples)
To store it as JSON, just pipe output to a file:
$ node index.js > results.json
$ cat result.json
[
{
"name": "babel",
"method": "benchmarkjs",
"operations": [
{
"name": "transform (code=true ast=true)",
"opsSec": 67.80076532539411,
"samples": 3
},
{
...Estimated unpacked size across 65 packages.
36.2 MB+
Includes dependencies.
3.10.1
2.6.0
6.2.3
7.15.0
9.0.0
0.11.0
0.15.0
5.4.5
7.0.2
1.13.6
1.13.8
4.17.3
4.17.27
7.24.0
8.1.2
7.12.5
7.12.7
1.11.15
1.13.0