npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@goodpie/js-build-benchmarker

v1.0.7

Published

A CLI tool to benchmark and compare JavaScript build tools

Downloads

57

Readme

JS Build Benchmarker

A command-line tool to benchmark and compare JavaScript build tools (webpack, esbuild, vite, rollup, etc.) by measuring build time, memory usage, and output size.

This is a tool that I have used for a while to explore different build tools for old projects, personal projects and legacy projects. Please use with other benchmarking tools.

npm version

Installation

Install globally:

npm install -g @goodpie/js-build-benchmarker
# or
bun install -g @goodpie/js-build-benchmarker

Usage

Initialize a benchmark configuration

js-build-benchmarker init

This interactive wizard will help you create a benchmark.config.json file with your build tools and configuration.

Run benchmarks

js-build-benchmarker run

Additional options:

  • -f, --file <path> - Specify a custom config file path
  • -i, --iterations <number> - Override number of iterations
  • --no-cache-clear - Disable cache clearing between runs

Configuration

The benchmark.config.json file contains your benchmark configuration:

{
  "iterations": 30,
  "clearCache": true,
  "tools": [
    {
      "name": "webpack",
      "command": "webpack --mode production",
      "outputDir": "dist/",
      "clearCacheDir": "node_modules/.cache/webpack"
    },
    {
      "name": "esbuild",
      "command": "bun esbuild --bundle --minify",
      "outputDir": "dist/",
      "clearCacheDir": ".esbuild-cache"
    }
  ]
}

Configuration Options

| Option | Description | |--------|-------------| | iterations | Number of benchmark runs to perform for each tool | | clearCache | Whether to clear caches between runs | | tools | Array of build tools to benchmark | | cwd | Working directory for commands (optional) | | globalEnv | Environment variables for all tools (optional) |

Tool Configuration

| Option | Description | |--------|-------------| | name | Tool name | | command | Build command to execute | | outputDir | Directory with build output (for size measurement) | | env | Tool-specific environment variables (optional) | | clearCacheCommand | Command to clear cache (optional) | | clearCacheDir | Directory to remove for cache clearing (optional) |

Example Output

===== BENCHMARK SUMMARY =====

WEBPACK:
Build time (s): avg=5.42, min=4.98, max=5.87
Memory usage (MB): avg=245.32, min=220.15, max=265.87
Output Size (MB): avg=1.25, min=1.25, max=1.25

ESBUILD:
Build time (s): avg=0.32, min=0.28, max=0.38
Memory usage (MB): avg=95.42, min=90.18, max=102.33
Output Size (MB): avg=1.32, min=1.32, max=1.32

===== COMPARISONS =====

esbuild vs webpack:
Speed: esbuild is 16.94x faster
Memory: esbuild uses 0.39x less memory
Size: esbuild 0.95x less

Requirements

  • Node.js 20.x or later
  • Bun.js (recommended for better performance)

License

MIT