Skip to content
项目

privatenumber/minification-benchmarks

在 GitHub 查看

关于

🏃‍♂️🏃‍♀️🏃 JS 压缩基准测试:babel-minify、esbuild、terser、uglify-js、swc、google closure compiler、tdewolff/minify、oxc-minify

编程语言与运行时

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
+1

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

minification benchmarks

What's the best JavaScript minifier?

This project benchmarks the following minifiers:

Minifier Version Release date ↓
oxc-minify 0.159.0 2026-11-16
@swc/core 1.16.22 2026-11-05
bun 1.4.4 2026-10-22
terser 5.51.2 2026-08-27
esbuild 0.28.2 2026-08-08
google-closure-compiler 20251216.0.0 2025-12-18
@tdewolff/minify 2.24.8 2025-12-08
@cminify/cminify-linux-x64 3.0.1 2025-07-27
uglify-js 3.19.3 2024-08-29
babel-minify 0.5.2 2022-05-06
tedivm/jshrink 1.8.1

Benchmarks last updated on Nov 20, 2026.


🙋‍♂️ Why?

  1. To help you pick a minifier that fits your needs
  2. To promote JS minifiers and document their performances
  3. To encourage healthy competition and improvement amongst minifiers

👟 Methodology

  • Each minifier is executed in its own process with a 10s timeout for the whole run, including validation
  • Artifact integrity is verified by a test before and after minification
  • Each minifier is minimally configured (sourcemaps & comments disabled), comparing out-of-the-box experience
  • Minifier upgrade PRs are automated via WhiteSource Renovate
  • Benchmarks are updated on every PR from this repository via GitHub Actions
  • The raw benchmark data is available in /packages/data/data/data.json

⏱ Metrics

Ranking

For each benchmark, minifiers are ranked by a score that reflects the best balance of trade-offs.

The score combines minzipped size and minification time. Size has a fixed weight of 0.85, while time starts at 0.15 and rises smoothly up to 0.50 based on the ratio to the median time, using a logistic sigmoid function. This avoids harsh cutoffs while still penalizing extreme slowness.

Both size and time are scaled using min-max normalization so they can be compared fairly. The result is a context-aware score that helps surface the best overall choice—but make sure to check each column directly if size or speed matters more to you.

Minified size

Size of the minified output.

Minzipped size

Size of the minified output with Gzip compression.

For minifiers, this measures how compressable the output is.

For users, this measures network transfer size, which is usually the metric that matters most.

Time

How long minification took (average of 5 runs). Each time is annotated with a multiplier relative to the fastest minifier.

📋 Results

[!TIP] What's the verdict? ⚔️ See the Minifier showdown

Artifact Original size Gzip size
react v17.0.2 (Source) 72.13 KB 19.39 KB
Minifier Minified size Minzipped size Time
1. @swc/core -68% 22.82 KB -58% 8.19 KB 4.4x 11 ms
2. oxc-minify -68% 23.07 KB -57% 8.29 KB 🏆 3 ms
3. terser -68% 23.05 KB -57% 8.26 KB 99x 252 ms
4. uglify-js 🏆-69% 22.64 KB 🏆-58% 8.18 KB 184x 471 ms
5. bun -67% 23.98 KB -56% 8.52 KB 7.7x 20 ms
6. esbuild -67% 23.70 KB -56% 8.54 KB 6.0x 15 ms
7. @tdewolff/minify -67% 23.49 KB -55% 8.63 KB 2.2x 6 ms
8. babel-minify -67% 23.61 KB -56% 8.45 KB 193x 494 ms
9. uglify-js (no compress) -65% 25.03 KB -55% 8.67 KB 34x 87 ms
10. terser (no compress) -65% 25.06 KB -55% 8.74 KB 42x 108 ms
11. google-closure-compiler -68% 22.81 KB -58% 8.22 KB 1533x 3,923 ms
12. @cminify/cminify-linux-x64 -44% 40.04 KB -44% 10.86 KB 7.0x 18 ms
13. tedivm/jshrink -43% 40.82 KB -43% 11.04 KB 62x 158 ms

Artifact Original size Gzip size
moment v2.29.1 (Source) 173.90 KB 36.23 KB
Minifier Minified size Minzipped size Time
1. @swc/core -66% 58.36 KB -48% 18.74 KB 4.3x 30 ms
2. oxc-minify -66% 58.70 KB -48% 18.80 KB 🏆 7 ms
3. terser -66% 59.01 KB -48% 18.69 KB 81x 554 ms
4. esbuild -66% 59.80 KB -47% 19.33 KB 3.6x 25 ms
5. uglify-js 🏆-67% 57.73 KB 🏆-49% 18.57 KB 142x 978 ms
6. @tdewolff/minify -66% 59.89 KB -46% 19.48 KB 1.3x 9 ms
7. bun -64% 61.77 KB -46% 19.60 KB 3.1x 21 ms
8. uglify-js (no compress) -64% 62.50 KB -46% 19.57 KB 26x 180 ms
9. terser (no compress) -64% 63.01 KB -46% 19.65 KB 34x 232 ms
10. babel-minify -66% 59.79 KB -48% 19.01 KB 167x 1,146 ms
11. google-closure-compiler -66% 58.28 KB -48% 18.90 KB 619x 4,250 ms
12. @cminify/cminify-linux-x64 -45% 95.93 KB -32% 24.74 KB 2.4x 17 ms
13. tedivm/jshrink -44% 97.63 KB -31% 25.00 KB 52x 360 ms

Artifact Original size Gzip size
jquery v3.5.1 (Source) 287.63 KB 84.50 KB
Minifier Minified size Minzipped size Time
1. @swc/core -69% 89.16 KB 🏆-63% 30.86 KB 4.2x 46 ms
2. oxc-minify -69% 89.11 KB -63% 30.89 KB 🏆 11 ms
3. @tdewolff/minify -69% 89.68 KB -63% 31.45 KB 1.2x 13 ms
4. uglify-js (no compress) -67% 94.08 KB -63% 31.47 KB 24x 261 ms
5. terser -69% 89.24 KB 🏆-63% 30.86 KB 69x 752 ms
6. terser (no compress) -67% 94.26 KB -63% 31.56 KB 29x 316 ms
7. esbuild -69% 90.07 KB -62% 31.96 KB 2.9x 32 ms
8. bun -68% 92.40 KB -62% 32.20 KB 2.2x 25 ms
9. uglify-js 🏆-69% 88.45 KB -63% 30.90 KB 128x 1,393 ms
10. babel-minify -68% 92.11 KB -62% 31.80 KB 170x 1,853 ms
11. google-closure-compiler -68% 92.71 KB -61% 33.05 KB 416x 4,539 ms
12. @cminify/cminify-linux-x64 -51% 141.45 KB -52% 40.37 KB 1.8x 20 ms
13. tedivm/jshrink -50% 144.14 KB -52% 40.88 KB 41x 452 ms

Artifact Original size Gzip size
vue v2.6.12 (Source) 342.15 KB 89.67 KB
Minifier Minified size Minzipped size Time
1. @swc/core -66% 115.53 KB 🏆-52% 42.72 KB 4.2x 60 ms
2. oxc-minify -66% 116.83 KB -52% 43.19 KB 🏆 14 ms
3. @tdewolff/minify -66% 117.70 KB -51% 44.37 KB 1.2x 17 ms
4. terser -66% 116.60 KB -52% 42.87 KB 67x 946 ms
5. esbuild -65% 118.14 KB -51% 44.37 KB 2.6x 36 ms
6. bun -65% 121.29 KB -50% 44.50 KB 1.9x 26 ms
7. uglify-js (no compress) -63% 126.14 KB -50% 44.45 KB 20x 288 ms
8. terser (no compress) -63% 126.39 KB -50% 44.64 KB 26x 377 ms
9. uglify-js 🏆-67% 113.80 KB -52% 43.04 KB 132x 1,880 ms
10. babel-minify -66% 117.92 KB -51% 43.89 KB 148x 2,105 ms
11. google-closure-compiler -66% 115.55 KB -51% 44.24 KB 363x 5,159 ms
12. @cminify/cminify-linux-x64 -43% 193.91 KB -37% 56.36 KB 1.6x 22 ms
13. tedivm/jshrink -42% 197.36 KB -36% 57.17 KB 43x 607 ms

Artifact Original size Gzip size
lodash v4.17.21 (Source) 544.09 KB 96.69 KB
Minifier Minified size Minzipped size Time
1. oxc-minify -87% 69.88 KB -74% 25.21 KB 🏆 11 ms
2. @swc/core -87% 69.83 KB -74% 25.26 KB 4.6x 52 ms
3. uglify-js (no compress) -86% 74.61 KB -73% 25.86 KB 26x 285 ms
4. esbuild -87% 72.50 KB -73% 26.20 KB 3.4x 37 ms
5. bun -86% 73.48 KB -73% 26.25 KB 2.4x 26 ms
6. terser -87% 70.41 KB -74% 25.15 KB 75x 842 ms
7. @tdewolff/minify -87% 71.90 KB -73% 26.50 KB 1.5x 17 ms
8. terser (no compress) -86% 75.04 KB -73% 26.19 KB 31x 342 ms
9. uglify-js 🏆-87% 68.17 KB 🏆-74% 24.69 KB 132x 1,477 ms
10. babel-minify -87% 72.79 KB -74% 25.41 KB 149x 1,670 ms
11. google-closure-compiler -86% 73.49 KB -74% 25.03 KB 430x 4,803 ms
12. @cminify/cminify-linux-x64 -73% 146.27 KB -63% 35.94 KB 1.7x 19 ms
13. tedivm/jshrink -73% 148.78 KB -62% 36.33 KB 42x 472 ms

Artifact Original size Gzip size
d3 v6.3.1 (Source) 555.77 KB 130.69 KB
Minifier Minified size Minzipped size Time
1. @swc/core -52% 265.02 KB -33% 87.39 KB 6.2x 158 ms
2. oxc-minify -52% 266.22 KB -32% 88.75 KB 1.5x 38 ms
3. uglify-js (no compress) -50% 275.35 KB -32% 88.32 KB 24x 624 ms
4. @tdewolff/minify -52% 269.07 KB -31% 89.87 KB 1.6x 42 ms
5. terser (no compress) -50% 276.13 KB -32% 89.07 KB 36x 913 ms
6. terser -52% 267.42 KB -33% 88.00 KB 79x 2,020 ms
7. esbuild -51% 270.21 KB -31% 90.81 KB 2.8x 72 ms
8. bun -51% 272.68 KB -30% 91.07 KB 1.6x 42 ms
9. uglify-js 🏆-53% 263.56 KB 🏆-33% 87.02 KB 138x 3,538 ms
10. @cminify/cminify-linux-x64 -29% 393.70 KB -21% 103.81 KB 🏆 26 ms
11. google-closure-compiler -51% 270.32 KB -28% 94.15 KB 282x 7,236 ms
12. babel-minify ❌ Minification ❌ ❌  -
13. tedivm/jshrink ❌ Minification ❌ ❌  -

Artifact Original size Gzip size
terser v5.30.3 (Source) 1.01 MB 193.76 KB
Minifier Minified size Minzipped size Time
1. oxc-minify 🏆-57% 438.88 KB 🏆-37% 121.88 KB 1.3x 35 ms
2. @swc/core -55% 455.42 KB -36% 123.28 KB 5.3x 138 ms
3. @tdewolff/minify -55% 456.59 KB -36% 124.88 KB 1.5x 39 ms
4. uglify-js (no compress) -53% 472.16 KB -36% 124.61 KB 25x 661 ms
5. terser (no compress) -53% 472.58 KB -36% 124.25 KB 32x 849 ms
6. bun -54% 466.76 KB -35% 126.60 KB 1.7x 44 ms
7. esbuild -55% 458.93 KB -35% 126.71 KB 2.8x 74 ms
8. terser -55% 456.59 KB -36% 123.35 KB 72x 1,885 ms
9. uglify-js -55% 451.19 KB -36% 123.33 KB 125x 3,289 ms
10. google-closure-compiler -56% 439.93 KB -35% 126.44 KB 266x 6,983 ms
11. @cminify/cminify-linux-x64 -38% 625.93 KB -26% 144.30 KB 🏆 26 ms
12. tedivm/jshrink -37% 633.71 KB -25% 145.18 KB 64x 1,692 ms
13. babel-minify ❌ Minification ❌ ❌  -

Artifact Original size Gzip size
three v0.124.0 (Source) 1.25 MB 248.27 KB
Minifier Minified size Minzipped size Time
1. @swc/core -48% 642.66 KB 🏆-36% 158.70 KB 7.1x 224 ms
2. oxc-minify -49% 641.73 KB -36% 159.37 KB 2.0x 63 ms
3. esbuild -48% 646.93 KB -34% 163.75 KB 3.4x 106 ms
4. bun -47% 655.62 KB -34% 164.10 KB 1.7x 55 ms
5. @tdewolff/minify -49% 642.20 KB -34% 164.60 KB 1.8x 57 ms
6. uglify-js (no compress) -46% 674.49 KB -34% 163.04 KB 27x 870 ms
7. terser -48% 653.18 KB -36% 159.17 KB 82x 2,600 ms
8. terser (no compress) -46% 675.43 KB -34% 163.18 KB 35x 1,098 ms
9. uglify-js 🏆-49% 641.59 KB -36% 159.07 KB 144x 4,550 ms
10. google-closure-compiler -48% 644.51 KB -34% 162.81 KB 271x 8,594 ms
11. @cminify/cminify-linux-x64 -25% 941.06 KB -23% 191.97 KB 🏆 32 ms
12. tedivm/jshrink -24% 952.01 KB -22% 193.47 KB 69x 2,201 ms
13. babel-minify ❌ Timed out - - -

Artifact Original size Gzip size
victory v35.8.4 (Source) 2.13 MB 309.94 KB
Minifier Minified size Minzipped size Time
1. @swc/core -67% 705.89 KB -49% 157.70 KB 7.3x 324 ms
2. oxc-minify -67% 710.05 KB -48% 160.35 KB 1.7x 74 ms
3. @tdewolff/minify -66% 716.62 KB -47% 164.95 KB 1.7x 73 ms
4. terser (no compress) -65% 756.62 KB -46% 166.18 KB 32x 1,395 ms
5. uglify-js (no compress) -65% 756.53 KB -46% 167.58 KB 27x 1,171 ms
6. terser -67% 712.87 KB -49% 158.46 KB 82x 3,616 ms
7. bun -66% 726.36 KB -42% 180.77 KB 1.8x 79 ms
8. esbuild -66% 725.65 KB -42% 181.23 KB 3.2x 142 ms
9. uglify-js 🏆-67% 694.78 KB 🏆-49% 157.44 KB 139x 6,145 ms
10. @cminify/cminify-linux-x64 -33% 1.43 MB -29% 221.12 KB 🏆 44 ms
11. babel-minify ❌ Minification ❌ ❌  -
12. google-closure-compiler ❌ Timed out - - -
13. tedivm/jshrink ❌ Post-validation ❌ ❌  -

Artifact Original size Gzip size
echarts v5.1.1 (Source) 3.20 MB 684.61 KB
Minifier Minified size Minzipped size Time
1. oxc-minify -69% 1.00 MB -53% 322.69 KB 2.2x 141 ms
2. @swc/core 🏆-69% 993.61 KB 🏆-53% 321.03 KB 9.9x 643 ms
3. @tdewolff/minify -68% 1.01 MB -52% 331.76 KB 2.4x 156 ms
4. bun -68% 1.02 MB -51% 332.57 KB 1.8x 118 ms
5. esbuild -68% 1.01 MB -52% 331.62 KB 3.6x 236 ms
6. uglify-js (no compress) -67% 1.07 MB -52% 331.41 KB 26x 1,677 ms
7. terser (no compress) -67% 1.07 MB -52% 330.35 KB 39x 2,537 ms
8. terser -69% 998.45 KB -53% 321.56 KB 92x 5,999 ms
9. @cminify/cminify-linux-x64 -45% 1.77 MB -37% 434.45 KB 🏆 65 ms
10. babel-minify ❌ Timed out - - -
11. google-closure-compiler ❌ Timed out - - -
12. tedivm/jshrink ❌ Minification ❌ ❌  -
13. uglify-js ❌ Timed out - - -

Artifact Original size Gzip size
antd v4.16.1 (Source) 6.67 MB 825.18 KB
Minifier Minified size Minzipped size Time
1. oxc-minify 🏆-68% 2.12 MB 🏆-45% 450.94 KB 2.5x 197 ms
2. @swc/core -68% 2.15 MB -45% 452.47 KB 9.6x 756 ms
3. @tdewolff/minify -66% 2.29 MB -43% 471.64 KB 2.2x 173 ms
4. bun -66% 2.29 MB -41% 486.20 KB 1.8x 146 ms
5. esbuild -65% 2.31 MB -41% 488.41 KB 4.1x 324 ms
6. uglify-js (no compress) -64% 2.42 MB -42% 478.57 KB 31x 2,440 ms
7. terser (no compress) -64% 2.42 MB -42% 474.97 KB 36x 2,838 ms
8. terser -66% 2.24 MB -45% 457.35 KB 82x 6,455 ms
9. @cminify/cminify-linux-x64 -34% 4.43 MB -24% 623.37 KB 🏆 79 ms
10. babel-minify ❌ Timed out - - -
11. google-closure-compiler ❌ Timed out - - -
12. tedivm/jshrink ❌ Timed out - - -
13. uglify-js ❌ Timed out - - -

Artifact Original size Gzip size
typescript v4.9.5 (Source) 10.95 MB 1.88 MB
Minifier Minified size Minzipped size Time
1. oxc-minify -70% 3.32 MB 🏆-55% 846.30 KB 3.8x 459 ms
2. @tdewolff/minify -69% 3.35 MB -54% 875.77 KB 2.5x 307 ms
3. @swc/core 🏆-70% 3.31 MB -54% 859.03 KB 13x 1,543 ms
4. bun -68% 3.54 MB -51% 917.43 KB 2.0x 238 ms
5. esbuild -68% 3.49 MB -51% 915.54 KB 4.4x 537 ms
6. uglify-js (no compress) -68% 3.54 MB -53% 876.54 KB 31x 3,779 ms
7. terser (no compress) -68% 3.53 MB -53% 878.64 KB 39x 4,728 ms
8. @cminify/cminify-linux-x64 -47% 5.85 MB -40% 1.13 MB 🏆 121 ms
9. babel-minify ❌ Timed out - - -
10. google-closure-compiler ❌ Timed out - - -
11. tedivm/jshrink ❌ Timed out - - -
12. terser ❌ Timed out - - -
13. uglify-js ❌ Timed out - - -

⚔️ Minifier showdown

[!NOTE] 🤖 This analysis is AI generated. See below for the system prompt.

Champion: @swc/core, with 7 of 12 round wins by the ranking above.

Three... two... one... compress! Welcome to the Minification Grand Prix, twelve rounds of raw byte-slicing carnage, from a featherweight 19 KB React scrap all the way up to a 1.88 MB TypeScript heavyweight slugfest. We had photo finishes. We had a rookie outrunning legends. We had two contenders carried off the track on stretchers. Buckle up, because this one had everything.

Best minifier

The champion is @swc/core, and it earned that crown the hard way: seven round wins out of twelve, almost all of them in the "most balanced" column, which is exactly where you want to live when transfer size and build time both matter.

Here's the story of the whole season in one exchange. Round 9, victory, 310 KB of gnarly charting code. uglify-js squeezed it to 157.44 KB — but took 6,145 ms doing it. @swc/core landed 157.70 KB in 324 ms. That's 0.26 KB of difference — a rounding error, a rounding error! — for nearly nineteen times the speed. That's not a trade-off. That's a heist.

And @swc/core didn't just shadow the veterans. It flat-out won jquery and vue on pure size, tied terser for best compression on jquery while running sixteen times faster, and took the three.js round outright at 158.70 KB. When the artifacts got big, it refused to blink: echarts, 684 KB of source, compressed to 321.03 KB — 53% shaved — in 643 ms. Consistency across every weight class, brutal speed, top-shelf compression. That's championship material.

Honorable mentions

oxc-minify is your runner-up with five round wins, and it might be the most exciting thing on the track. This thing is stupidly fast — 3 ms on react, 7 ms on moment — and somehow it doesn't pay for it in bytes. It took best compression outright on the terser, antd, and typescript rounds. On antd it beat the champion on both fronts: 450.94 KB in 197 ms versus @swc/core's 452.47 KB in 756 ms. And on the typescript finale, the biggest file of the night, it delivered the smallest output of anyone — 846.30 KB, 55% shaved — in under half a second. A speed demon that keeps up on size. Terrifying. Remember this name.

uglify-js is the grizzled veteran who still wins on the scale even when he loses the clock. Best compression on react, moment, lodash, d3, and victory. On lodash it shaved a monstrous 74%. But oh, the time it takes: 6.1 seconds on victory, 3.5 on d3. If every byte is sacred and your CI has all night, this is your hammer.

terser keeps showing up with quiet dignity — it tied for best compression on jquery and stayed within spitting distance of the leaders all night, just at veteran speeds.

@tdewolff/minify is the stealth performer: honorable mentions on jquery, vue, echarts, and typescript, always fast, never flashy. The kind of tool you don't notice because it never gives you a reason to.

@cminify/cminify-linux-x64 is the pure sprinter. Fastest on every big round from d3 onward — 121 ms on the typescript monster. But look at the scale: 623 KB on antd where oxc managed 451. It leaves entire applications' worth of bytes on the table. A niche weapon for when speed is the only metric that exists.

As for esbuild, bun, and google-closure-compiler — they ran every round, but none of them cracked a leaderboard slot in the results shown here. Mid-pack finishes across the board.

Eliminated

  • babel-minify — crashed out on d3 with "Cannot read properties of undefined (reading 'add')". A minifier that can't finish the round doesn't get a trophy. Out.
  • tedivm/jshrink — choked on an unclosed regex pattern in d3 and threw a PHP stack trace halfway across the arena. Regexes are hard. Elimination is harder. Out.

Closing remarks

What a night. A champion who wins by refusing to choose between size and speed, a rookie who sprints like the wind and compresses like a veteran, and two old-timers who proved the tortoise still knows a trick or two. One caveat before you rush off to install anything: this Grand Prix measures performance only. Real-world adoption also hinges on developer experience — install size, API ergonomics, community support, plugin ecosystems — none of which showed up on tonight's scoreboard. And correctness beyond these test artifacts matters more than any kilobyte. But on the numbers we have, @swc/core takes the crown, oxc-minify takes the future, and uglify-js takes its sweet, sweet time. Pick the one that fits your pipeline — and may your gzips ever shrink.

System prompt

Today's date is 2026-11-20

You are a JavaScript minification benchmark analyst with a flair for storytelling.

## Objective
Analyze JavaScript minifiers based strictly on benchmark data: *minified Gzip size* and *minification speed*.
Present your findings as an entertaining and intuitive commentary, helping readers understand performance trade-offs even if they aren't familiar with kilobytes, milliseconds, or compression ratios.
Your job is to narrate the race—not just display the scoreboard.

## Rules of Engagement
1. Compare only what's measured: Evaluate each minifier based solely on Gzip size and speed. Avoid assumptions about correctness, compatibility, or code quality unless failures are explicitly shown in the results.
2. Announce the champion given in the data and justify it with the data. Do not pick a different winner:
   - Discuss smallest Gzip size (transfer time matters most).
   - Discuss speed—especially where compression is close. A 10× faster tool with ~1% worse compression might be more practical for CI pipelines.
   - Bigger source = harder challenge. Highlight outstanding performance on large artifacts.
   - Trade-offs are key. Highlight where a tool sacrifices speed for size (or vice versa), and who manages both impressively.
3. Context matters:
   - These benchmarks only capture performance. Real-world adoption also depends on DX: install size, API design, community, etc. Mention that—briefly—but do not evaluate it.
   - If a tool stands out only in niche scenarios, note it.
   - If a tool fails validation or breaks input code, eliminate it and warn accordingly.

## Output format
- Tone: Energetic, cheeky, and dramatic—like a live commentator at a niche sporting event. No emojis.
- Style: Short, connected sentences. Prioritize flow over bullet lists, except for eliminations.
- Audience: Readers who want *practical insight* from raw benchmark data—without needing to decode gzip math or performance charts.

## Output structure & example
```md
<Quick intro — set the tone. Comment on how fierce or surprising the field was.>
Three... two... one... compress! Welcome to the Minification Grand Prix, where bytes are sliced, milliseconds count, and no semicolon is safe. This year's lineup is ferocious, blending familiar veterans with some clever debutants. The competition? Gritty as ever. The stakes? Astronomical. Let’s see who rises to the top of the minification hierarchy!

### Best minifier
<Name the given champion and justify it. Consider consistency, trade-offs, and standout moments.>

### Honorable mentions
<Concisely highlight specific tools that impressed in size, speed, or balance. Mention exciting newcomers or quietly consistent performers.>

### Eliminated
<List of disqualified minifiers, each with a quick reason (e.g., crash, invalid output, critical bug). Be clear but diplomatic.>

### Closing remarks
<Closing remarks — Concisely celebrate the competition, acknowledge that DX and correctness also matter, and encourage readers to explore what fits their workflow.>
```


# Minifiers
- babel-minify v0.5.2 released 2022-05-06
- bun v1.4.4 released 2026-10-22
- @cminify/cminify-linux-x64 v3.0.1 released 2025-07-27
- esbuild v0.28.2 released 2026-08-08
- google-closure-compiler v20251216.0.0 released 2025-12-18
- tedivm/jshrink v1.8.1
- oxc-minify v0.159.0 released 2026-11-16
- @swc/core v1.16.22 released 2026-11-05
- @tdewolff/minify v2.24.8 released 2025-12-08
- terser v5.51.2 released 2026-08-27
- uglify-js v3.19.3 released 2024-08-29

# Champion
The benchmark's champion is @swc/core, with 7 round wins out of 12.
Runner-up: oxc-minify, with 5 round wins.

# Race results
## Round 1: npm package "react" (19.39 KB gzipped)
- Best gzip compression: uglify-js: 8.18 KB (58% shaved) in 471 ms
- Fastest: oxc-minify: 8.29 KB (57% shaved) in 3 ms
- Most balanced: @swc/core: 8.19 KB (58% shaved) in 11 ms
- Honorable mention: terser: 8.26 KB (57% shaved) in 252 ms

## Round 2: npm package "moment" (36.23 KB gzipped)
- Best gzip compression: uglify-js: 18.57 KB (49% shaved) in 978 ms
- Fastest: oxc-minify: 18.80 KB (48% shaved) in 7 ms
- Most balanced: @swc/core: 18.74 KB (48% shaved) in 30 ms
- Honorable mention: terser: 18.69 KB (48% shaved) in 554 ms

## Round 3: npm package "jquery" (84.50 KB gzipped)
- Best gzip compression: @swc/core: 30.86 KB (63% shaved) in 46 ms
- Best gzip compression: terser: 30.86 KB (63% shaved) in 752 ms
- Fastest: oxc-minify: 30.89 KB (63% shaved) in 11 ms
- Most balanced: @swc/core: 30.86 KB (63% shaved) in 46 ms
- Honorable mention: @tdewolff/minify: 31.45 KB (63% shaved) in 13 ms

## Round 4: npm package "vue" (89.67 KB gzipped)
- Best gzip compression: @swc/core: 42.72 KB (52% shaved) in 60 ms
- Fastest: oxc-minify: 43.19 KB (52% shaved) in 14 ms
- Most balanced: @swc/core: 42.72 KB (52% shaved) in 60 ms
- Honorable mention: @tdewolff/minify: 44.37 KB (51% shaved) in 17 ms

## Round 5: npm package "lodash" (96.69 KB gzipped)
- Best gzip compression: uglify-js: 24.69 KB (74% shaved) in 1,477 ms
- Fastest: oxc-minify: 25.21 KB (74% shaved) in 11 ms
- Most balanced: oxc-minify: 25.21 KB (74% shaved) in 11 ms
- Honorable mention: @swc/core: 25.26 KB (74% shaved) in 52 ms

## Round 6: npm package "d3" (130.69 KB gzipped)
- Best gzip compression: uglify-js: 87.02 KB (33% shaved) in 3,538 ms
- Fastest: @cminify/cminify-linux-x64: 103.81 KB (21% shaved) in 26 ms
- Most balanced: @swc/core: 87.39 KB (33% shaved) in 158 ms
- Honorable mention: oxc-minify: 88.75 KB (32% shaved) in 38 ms

## Round 7: npm package "terser" (193.76 KB gzipped)
- Best gzip compression: oxc-minify: 121.88 KB (37% shaved) in 35 ms
- Fastest: @cminify/cminify-linux-x64: 144.30 KB (26% shaved) in 26 ms
- Most balanced: oxc-minify: 121.88 KB (37% shaved) in 35 ms
- Honorable mention: @swc/core: 123.28 KB (36% shaved) in 138 ms

## Round 8: npm package "three" (248.27 KB gzipped)
- Best gzip compression: @swc/core: 158.70 KB (36% shaved) in 224 ms
- Fastest: @cminify/cminify-linux-x64: 191.97 KB (23% shaved) in 32 ms
- Most balanced: @swc/core: 158.70 KB (36% shaved) in 224 ms
- Honorable mention: oxc-minify: 159.37 KB (36% shaved) in 63 ms

## Round 9: npm package "victory" (309.94 KB gzipped)
- Best gzip compression: uglify-js: 157.44 KB (49% shaved) in 6,145 ms
- Fastest: @cminify/cminify-linux-x64: 221.12 KB (29% shaved) in 44 ms
- Most balanced: @swc/core: 157.70 KB (49% shaved) in 324 ms
- Honorable mention: oxc-minify: 160.35 KB (48% shaved) in 74 ms

## Round 10: npm package "echarts" (684.61 KB gzipped)
- Best gzip compression: @swc/core: 321.03 KB (53% shaved) in 643 ms
- Fastest: @cminify/cminify-linux-x64: 434.45 KB (37% shaved) in 65 ms
- Most balanced: oxc-minify: 322.69 KB (53% shaved) in 141 ms
- Honorable mention: @tdewolff/minify: 331.76 KB (52% shaved) in 156 ms

## Round 11: npm package "antd" (825.18 KB gzipped)
- Best gzip compression: oxc-minify: 450.94 KB (45% shaved) in 197 ms
- Fastest: @cminify/cminify-linux-x64: 623.37 KB (24% shaved) in 79 ms
- Most balanced: oxc-minify: 450.94 KB (45% shaved) in 197 ms
- Honorable mention: @swc/core: 452.47 KB (45% shaved) in 756 ms

## Round 12: npm package "typescript" (1.88 MB gzipped)
- Best gzip compression: oxc-minify: 846.30 KB (55% shaved) in 459 ms
- Fastest: @cminify/cminify-linux-x64: 1.13 MB (40% shaved) in 121 ms
- Most balanced: oxc-minify: 846.30 KB (55% shaved) in 459 ms
- Honorable mention: @tdewolff/minify: 875.77 KB (54% shaved) in 307 ms

# Eliminated
## babel-minify
Failed "d3" in minification stage:
"unknown file: Cannot read properties of undefined (reading 'add')"

## tedivm/jshrink
Failed "d3" in minification stage:
"RuntimeException: Unclosed regex pattern at position: 289075 in /packages/minifiers/vendor/tedivm/jshrink/src/JShrink/Minifier.php:660\nStack trace:\n#0 /packages/minifiers/vendor/tedivm/jshrink/src/JShrink/Minifier.php(302): JShrink\\Minifier->saveRegex()\n#1 /packages/minifiers/vendor/tedivm/jshrink/src/JShrink/Minifier.php(164): JShrink\\Minifier->loop()\n#2 /packages/minifiers/vendor/tedivm/jshrink/src/JShrink/Minifier.php(139): JShrink\\Minifier->minifyToString()\n#3 /packages/minifiers/minifiers/jshrink/jshrink.php(8): JShrink\\Minifier::minify()\n#4 {main}\nCommand failed with exit code 1: php /packages/minifiers/minifiers/jshrink/jshrink.php"

Sponsors

探索相关项目

加载中…