Benchmarks · compare the work as well as the clock
Fast, conservative minification measured against specialist tools.
Speed and compression are separate dimensions. These measurements preserve both: Minify++ can finish conservative lexical minification quickly, while deeper parsers and optimisers often produce smaller output.
nift minify process and temporary-file I/O.Test environment
9b56d9b, g++ 15.2.0 -O2The Lightning CSS distribution identifies itself as package 1.33.0, although its binary reports lightningcss 1.0.0-alpha.72; both identifiers are retained in the raw result. CSS uses five warmups and 45 measured invocations per tool and fixture. Tables show medians; JSON preserves every timing sample and p25/p75 values.
CSS CLI latency
Each sample starts one fresh process and includes the tool writing its output. Fixture preparation occurs before the timer. On this machine and these fixtures, Minify++ had the lowest median CLI latency. This is not an engine-only comparison and does not imply equivalent optimisation work.
| Fixture | Minify++ | esbuild | Lightning CSS |
|---|---|---|---|
| Bootstrap 4 | 2.797 ms | 19.406 ms | 9.964 ms |
| Animate.css | 1.953 ms | 9.853 ms | 4.396 ms |
| Tailwind CSS | 13.274 ms | 121.299 ms | 73.257 ms |
CSS output size
The chart defines output percentage as output bytes / input bytes × 100. Lower is smaller. Lightning CSS produced the smallest output for all three fixtures; Minify++ was the least aggressive. The gap is visible rather than normalized away.
| Fixture | Input | Tool | Output | Input retained | gzip -9 |
|---|---|---|---|---|---|
| Bootstrap 4 | 200,078 B | Minify++ | 165,836 B | 82.89% | 24,219 B |
| esbuild | 160,542 B | 80.24% | 23,847 B | ||
| Lightning CSS | 153,616 B | 76.78% | 23,541 B | ||
| Animate.css | 95,374 B | Minify++ | 77,454 B | 81.21% | 5,185 B |
| esbuild | 73,286 B | 76.84% | 5,026 B | ||
| Lightning CSS | 68,837 B | 72.18% | 4,790 B | ||
| Tailwind CSS | 2,380,419 B | Minify++ | 1,973,801 B | 82.92% | 185,088 B |
| esbuild | 1,961,069 B | 82.38% | 187,287 B | ||
| Lightning CSS | 1,864,728 B | 78.34% | 179,867 B |
Animate.css remains important even though the current Lightning CSS result is less dramatic than its older published comparison: animation-heavy CSS still exposes deeper optimisation opportunities. Historical vendor-published output sizes remain useful context, but they are not substituted for these current same-host results.
JavaScript: Nift in the upstream suite
The current upstream suite at commit fe89864fdf0e9e8f178d5cfa704f4b032986aade ran 12 real package artifacts. It creates a fresh benchmark process, validates each artifact before and after minification, applies a 10-second timeout, and averages five runs. The tested executable reported Nift 4.0.2 at commit aa60ab3 with embedded Minify++ 1.1.0.
Nift completed all 12 artifacts without an integrity or timeout failure. Its upstream score ranked it last among successful tools on every artifact because the score weights minzipped size heavily and Minify++ deliberately does not perform the AST-level compression of the specialist JavaScript optimisers. On the largest inputs, its latency also rose sharply: 2,109.9 ms for Ant Design (6.67 MB) and 2,368.1 ms for TypeScript (10.95 MB). Those results are retained as a scaling signal, not hidden.
D3 representative result
D3 6.3.1 is near the middle of the 12-artifact corpus by input size. The charts include every successful default configuration from this run. Duplicate “no compress” variants are omitted from the chart, while all configurations and failures remain in the raw JSON. The time chart uses a clearly labelled logarithmic scale because the slowest and fastest entries differ by almost two orders of magnitude.
| Tool | Version | Minified | Minzipped | Average time |
|---|---|---|---|---|
| cminify | 3.0.1 | 393,697 B | 103,813 B | 20.317 ms |
| SWC | 1.15.46 | 265,026 B | 87,392 B | 105.431 ms |
| tdewolff/minify | 2.24.8 | 269,065 B | 89,866 B | 26.904 ms |
| Bun | 1.3.14 | 272,734 B | 92,345 B | 35.621 ms |
| esbuild | 0.28.1 | 270,207 B | 90,809 B | 49.231 ms |
| Nift CLI¹ | 4.0.2 | 415,104 B | 106,901 B | 18.241 ms |
| Oxc | 0.141.0 | 267,203 B | 87,952 B | 28.058 ms |
| Terser | 5.49.0 | 267,417 B | 87,997 B | 967.181 ms |
| UglifyJS | 3.19.3 | 263,558 B | 87,016 B | 1,801.948 ms |
¹ Nift CLI includes a fresh nift minify process and temporary-file I/O. It measures what this integration path delivers, not Minify++ engine-only throughput.
A same-corpus D3 probe produced byte-identical standalone Minify++ and Nift output: 415,104 bytes with SHA-256 983e7584494c44d7e4bfe454cf99acbdd46a9545591026b9607f73642011fcb1. Nift is therefore not a separate minification engine.
Limitations and failures
- JShrink was not run because PHP and Composer were unavailable; stale upstream repository values were excluded.
- Google Closure Compiler failed because Java was unavailable.
- Babel Minify failed or hit the upstream timeout on several larger artifacts; UglifyJS timed out on TypeScript.
- CSS CLI measurements include process startup. They must not be merged with the in-process results on the Performance page.
- These are one-host, one-date measurements—not universal speed or compression claims.
Reproduce it
python3 benchmarks/run_css_competitive.py \
--minifypp ./minify \
--esbuild /path/to/esbuild \
--lightningcss /path/to/lightningcss \
--warmups 5 --iterations 45 \
--json benchmarks/results/css.json \
--csv benchmarks/results/css.csv \
/path/to/bootstrap-4.css /path/to/animate.css /path/to/tailwind.css
NIFT_BIN=/absolute/path/to/nift pnpm bench-all --force --runs 5 The Minify++ repository preserves the complete CSS sample distribution and the filtered upstream JavaScript snapshot under benchmarks/results/. Chart.js 4.5.1 is pinned and vendored locally; these charts are progressive enhancement, and every important displayed value remains in the tables when JavaScript is disabled.