Skip to content

Commit

Permalink
refactor(es/minifier): Respect toplevel and module options (#7671)
Browse files Browse the repository at this point in the history
  • Loading branch information
Austaras committed Jul 20, 2023
1 parent ce7f4b6 commit 9893bd2
Show file tree
Hide file tree
Showing 820 changed files with 1,659 additions and 3,641 deletions.
7 changes: 7 additions & 0 deletions crates/swc/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,13 @@ impl Options {
c.toplevel = Some(TerserTopLevelOptions::Bool(true));
}

if matches!(
cfg.module,
None | Some(ModuleConfig::Es6 | ModuleConfig::NodeNext)
) {
c.module = true;
}

c
})
.map(BoolOrDataConfig::from_obj)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
var t;
module.exports = ((t = function() {
"use strict";
function t() {}
return t.prototype.it = function() {
this.bb = new t.MyA();
}, t;
}()).MyA = function() {}, t);
var n;
module.exports = ((n = function() {
function n() {}
return n.prototype.it = function() {
this.bb = new n.MyA();
}, n;
}()).MyA = function() {}, n);
15 changes: 7 additions & 8 deletions crates/swc/tests/fixture/sourcemap/004/output/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@
158
],
{
2943: function(n, t, u) {
"use strict";
2943: function(n, u, t) {
var r = function(n) {
var t = n.data;
var u = n.data;
return (0, _.jsx)("div", {
children: t.foo
children: u.foo
});
};
u.r(t), u.d(t, {
t.r(u), t.d(u, {
__N_SSG: function() {
return i;
},
default: function() {
return r;
}
});
var _ = u(4512), i = !0;
var _ = t(4512), i = !0;
},
7139: function(n, t, u) {
7139: function(n, u, t) {
(window.__NEXT_P = window.__NEXT_P || []).push([
"/static",
function() {
return u(2943);
return t(2943);
}
]);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/sourcemap/004/output/index.map
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mappings": "AAACA,CAAAA,KAAKC,gBAAmB,GAAGD,KAAKC,gBAAmB,IAAI,EAAE,AAAF,EAAIC,IAAI,CAAC;IAC7D;QACI;KACH;IACD;QACU,MAAY,SAAUC,CAAuB,EAAEC,CAAmB,EAAEC,CAAmB;YACzF;YACA,IAAIC,IAAa,SAAoBC,CAAI;gBACrC,IAAIC,IAAOD,EAAKC,IAAI;gBACpB,OAAqB,AAAC,CAAA,GAAGC,EAA+CC,GAAG,AAAHA,EAAK,OAAO;oBAChFC,UAAUH,EAAKI,GAAG;gBACtB;YACJ;YACAP,EAAoBQ,CAAC,CAACT,IACDC,EAAoBS,CAAC,CAACV,GAAqB;gBACvCW,SAAS;oBAC1B,OAAqBA;gBACzB;gBACqBC,SAAS;oBAC1B,OAAqBV;gBACzB;YACJ;YACqB,IAAIG,IAAiDJ,EAAoB,OAC1FU,IAAU,CAAA;QAE1B;QACc,MAAY,SAAUZ,CAAuB,EAAEc,CAAwB,EAAEZ,CAAmB;YAC7Fa,CAAAA,OAAOC,QAAQ,GAAGD,OAAOC,QAAQ,IAAI,EAAE,AAAF,EAAIjB,IAAI,CAAC;gBAC3C;gBACA;oBACI,OAAOG,EAAoB;gBAC/B;aACH;QAGb;IACI;IACS,SAAUA,CAAmB;QAKzBA,EAAoBe,CAAC,CAAC,GAAG;YAC9B;YACA;YACA;SACH,EAAE;YACC,OAPOf,EAAoBA,EAAoBgB,CAAC,GAOxB;QAC5B,IAESC,OAD0BjB,EAAoBe,CAAC;IAGhE;CACC",
"mappings": "AAACA,CAAAA,KAAKC,gBAAmB,GAAGD,KAAKC,gBAAmB,IAAI,EAAE,AAAF,EAAIC,IAAI,CAAC;IAC7D;QACI;KACH;IACD;QACU,MAAY,SAAUC,CAAuB,EAAEC,CAAmB,EAAEC,CAAmB;YAEzF,IAAIC,IAAa,SAAoBC,CAAI;gBACrC,IAAIC,IAAOD,EAAKC,IAAI;gBACpB,OAAqB,AAAC,CAAA,GAAGC,EAA+CC,GAAG,AAAHA,EAAK,OAAO;oBAChFC,UAAUH,EAAKI,GAAG;gBACtB;YACJ;YACAP,EAAoBQ,CAAC,CAACT,IACDC,EAAoBS,CAAC,CAACV,GAAqB;gBACvCW,SAAS;oBAC1B,OAAqBA;gBACzB;gBACqBC,SAAS;oBAC1B,OAAqBV;gBACzB;YACJ;YACqB,IAAIG,IAAiDJ,EAAoB,OAC1FU,IAAU,CAAA;QAE1B;QACc,MAAY,SAAUZ,CAAuB,EAAEc,CAAwB,EAAEZ,CAAmB;YAC7Fa,CAAAA,OAAOC,QAAQ,GAAGD,OAAOC,QAAQ,IAAI,EAAE,AAAF,EAAIjB,IAAI,CAAC;gBAC3C;gBACA;oBACI,OAAOG,EAAoB;gBAC/B;aACH;QAGb;IACI;IACS,SAAUA,CAAmB;QAKzBA,EAAoBe,CAAC,CAAC,GAAG;YAC9B;YACA;YACA;SACH,EAAE;YACC,OAPOf,EAAoBA,EAAoBgB,CAAC,GAOxB;QAC5B,IAESC,OAD0BjB,EAAoBe,CAAC;IAGhE;CACC",
"names": [
"self",
"webpackChunk_N_E",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var A;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
(A || (A = {})).Point = function Point(x, y) {
"use strict";
_class_call_check(this, Point), this.x = x, this.y = y;
};
//// [test.ts]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
//// [ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var clodule1 = function clodule1() {
"use strict";
_class_call_check(this, clodule1);
};
clodule1 || (clodule1 = {});
var clodule2 = function clodule2() {
"use strict";
_class_call_check(this, clodule2);
};
clodule2 || (clodule2 = {});
var clodule3 = function clodule3() {
"use strict";
_class_call_check(this, clodule3);
};
(clodule3 || (clodule3 = {})).y = {
id: T
};
var clodule4 = function clodule4() {
"use strict";
_class_call_check(this, clodule4);
};
clodule4 || (clodule4 = {});
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var clodule = function() {
"use strict";
function clodule() {
_class_call_check(this, clodule);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var clodule = function() {
"use strict";
function clodule() {
_class_call_check(this, clodule);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//// [ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var clodule = function() {
"use strict";
function clodule() {
_class_call_check(this, clodule);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//// [ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var A, Point = function() {
"use strict";
function Point(x, y) {
_class_call_check(this, Point), this.x = x, this.y = y;
}
Expand All @@ -16,7 +15,6 @@ var A, Point = function() {
return null;
}, function(A) {
var Point = function() {
"use strict";
function Point(x, y) {
_class_call_check(this, Point), this.x = x, this.y = y;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//// [ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var A, Point = function() {
"use strict";
function Point(x, y) {
_class_call_check(this, Point), this.x = x, this.y = y;
}
Expand All @@ -14,7 +13,6 @@ var A, Point = function() {
}();
Point || (Point = {}), function(A) {
var Point = function() {
"use strict";
function Point(x, y) {
_class_call_check(this, Point), this.x = x, this.y = y;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
//// [ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var A, Point = function Point(x, y) {
"use strict";
_class_call_check(this, Point), this.x = x, this.y = y;
};
Point.Origin = {
x: 0,
y: 0
}, (Point || (Point = {})).Origin = "", function(A) {
var Point = function Point(x, y) {
"use strict";
_class_call_check(this, Point), this.x = x, this.y = y;
};
Point.Origin = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
//// [ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var A, Point = function Point(x, y) {
"use strict";
_class_call_check(this, Point), this.x = x, this.y = y;
};
Point.Origin = {
x: 0,
y: 0
}, Point || (Point = {}), function(A) {
var Point = function Point(x, y) {
"use strict";
_class_call_check(this, Point), this.x = x, this.y = y;
};
Point.Origin = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
//// [class.ts]
var X;
var X, X1;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
!function(X) {
(X.Y || (X.Y = {})).Point = function Point(x, y) {
"use strict";
_class_call_check(this, Point), this.x = x, this.y = y;
};
}(X || (X = {}));
((X1 = X || (X = {})).Y || (X1.Y = {})).Point = function Point(x, y) {
_class_call_check(this, Point), this.x = x, this.y = y;
};
//// [module.ts]
var X;
!function(X) {
Expand All @@ -18,7 +15,6 @@ new X.Y.Point(1, 1), X.Y.Point.Origin;
//// [simple.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var A = function A() {
"use strict";
_class_call_check(this, A);
};
(A || (A = {})).Instance = new A(), A.Instance, new A();
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
//// [class.ts]
var X;
!function(X) {
(X.Y || (X.Y = {})).Point = class {
constructor(x, y){
this.x = x, this.y = y;
}
};
}(X || (X = {}));
var X, X1;
((X1 = X || (X = {})).Y || (X1.Y = {})).Point = class {
constructor(x, y){
this.x = x, this.y = y;
}
};
//// [module.ts]
var X;
!function(X) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//// [ES5For-ofTypeCheck10.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var StringIterator = function() {
"use strict";
function StringIterator() {
_class_call_check(this, StringIterator);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var M;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
!function(M) {
var _$Symbol, C = function() {
"use strict";
function C() {
_class_call_check(this, C);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var Symbol;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
(new (function() {
"use strict";
function C() {
_class_call_check(this, C);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var Symbol;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
(new (function() {
"use strict";
function C() {
_class_call_check(this, C);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var Symbol;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
(new (function() {
"use strict";
function C() {
_class_call_check(this, C);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//// [ES5SymbolProperty6.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
(new (function() {
"use strict";
function C() {
_class_call_check(this, C);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var Symbol;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
(new (function() {
"use strict";
function C() {
_class_call_check(this, C);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//// [EnumAndModuleWithSameNameAndCommonRoot.ts]
var enumdule;
var enumdule, enumdule1;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
!function(enumdule) {
enumdule[enumdule.Red = 0] = "Red", enumdule[enumdule.Blue = 1] = "Blue";
}(enumdule || (enumdule = {})), (enumdule || (enumdule = {})).Point = function Point(x, y) {
"use strict";
(enumdule1 = enumdule || (enumdule = {}))[enumdule1.Red = 0] = "Red", enumdule1[enumdule1.Blue = 1] = "Blue", (enumdule || (enumdule = {})).Point = function Point(x, y) {
_class_call_check(this, Point), this.x = x, this.y = y;
}, enumdule.Red, new enumdule.Point(0, 0);
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var A;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
!function(A) {
var Point2d = function() {
"use strict";
function Point2d(x, y) {
_class_call_check(this, Point2d), this.x = x, this.y = y;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
!function(A) {
var Point = function Point() {
"use strict";
_class_call_check(this, Point);
};
A.Point = Point, A.Origin = {
x: 0,
y: 0
};
var Point3d = function(Point) {
"use strict";
_inherits(Point3d, Point);
var _super = _create_super(Point3d);
function Point3d() {
Expand All @@ -26,7 +24,6 @@ import { _ as _create_super } from "@swc/helpers/_/_create_super";
y: 0,
z: 0
}, A.Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
}(A || (A = {}));
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
var A;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
(A || (A = {})).points = function points() {
"use strict";
_class_call_check(this, points);
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import { _ as _create_super } from "@swc/helpers/_/_create_super";
y: 0
};
var Point3d = function(Point) {
"use strict";
_inherits(Point3d, Point);
var _super = _create_super(Point3d);
function Point3d() {
return _class_call_check(this, Point3d), _super.apply(this, arguments);
}
return Point3d;
}(function Point() {
"use strict";
_class_call_check(this, Point);
});
A.Point3d = Point3d, A.Origin3d = {
Expand All @@ -26,7 +24,6 @@ import { _ as _create_super } from "@swc/helpers/_/_create_super";
z: 0
};
var Line = function() {
"use strict";
function Line(start, end) {
_class_call_check(this, Line), this.start = start, this.end = end;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ var A;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
!function(A) {
A.Point = function Point() {
"use strict";
_class_call_check(this, Point);
};
var Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = function(p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var A;
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
!function(A) {
var Line = function Line(start, end) {
"use strict";
_class_call_check(this, Line), this.start = start, this.end = end;
};
A.Line = Line, A.fromOrigin = function(p) {
Expand Down

1 comment on commit 9893bd2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 9893bd2 Previous: 11b4679 Ratio
es/full/bugs-1 282562 ns/iter (± 8571) 287570 ns/iter (± 3936) 0.98
es/full/minify/libraries/antd 1311567857 ns/iter (± 14060782) 1303974765 ns/iter (± 34748509) 1.01
es/full/minify/libraries/d3 279466498 ns/iter (± 4713009) 292008409 ns/iter (± 5482928) 0.96
es/full/minify/libraries/echarts 1060415095 ns/iter (± 11723971) 1126290656 ns/iter (± 22123865) 0.94
es/full/minify/libraries/jquery 85457549 ns/iter (± 277183) 84759946 ns/iter (± 387425) 1.01
es/full/minify/libraries/lodash 99144430 ns/iter (± 253060) 99273284 ns/iter (± 669333) 1.00
es/full/minify/libraries/moment 50068428 ns/iter (± 118820) 50241920 ns/iter (± 186794) 1.00
es/full/minify/libraries/react 18088115 ns/iter (± 219200) 18025685 ns/iter (± 61045) 1.00
es/full/minify/libraries/terser 223709682 ns/iter (± 2674946) 227698205 ns/iter (± 1847163) 0.98
es/full/minify/libraries/three 385385992 ns/iter (± 2636769) 393924815 ns/iter (± 14130833) 0.98
es/full/minify/libraries/typescript 2646593756 ns/iter (± 12609079) 2703199769 ns/iter (± 31750638) 0.98
es/full/minify/libraries/victory 557718948 ns/iter (± 4592059) 564891562 ns/iter (± 14080028) 0.99
es/full/minify/libraries/vue 120517143 ns/iter (± 391068) 121267714 ns/iter (± 875220) 0.99
es/full/codegen/es3 34193 ns/iter (± 79) 33707 ns/iter (± 65) 1.01
es/full/codegen/es5 34271 ns/iter (± 68) 33707 ns/iter (± 83) 1.02
es/full/codegen/es2015 34209 ns/iter (± 51) 33705 ns/iter (± 40) 1.01
es/full/codegen/es2016 34233 ns/iter (± 89) 33603 ns/iter (± 91) 1.02
es/full/codegen/es2017 34184 ns/iter (± 99) 33655 ns/iter (± 105) 1.02
es/full/codegen/es2018 34200 ns/iter (± 86) 33745 ns/iter (± 56) 1.01
es/full/codegen/es2019 34236 ns/iter (± 89) 33772 ns/iter (± 88) 1.01
es/full/codegen/es2020 34276 ns/iter (± 62) 33604 ns/iter (± 44) 1.02
es/full/all/es3 173443920 ns/iter (± 875437) 172852711 ns/iter (± 796291) 1.00
es/full/all/es5 165949268 ns/iter (± 618715) 164467696 ns/iter (± 737323) 1.01
es/full/all/es2015 125217356 ns/iter (± 685180) 124600585 ns/iter (± 618801) 1.00
es/full/all/es2016 124100878 ns/iter (± 690187) 123456600 ns/iter (± 996095) 1.01
es/full/all/es2017 123762636 ns/iter (± 867461) 122268569 ns/iter (± 486031) 1.01
es/full/all/es2018 121907575 ns/iter (± 822109) 120858919 ns/iter (± 501550) 1.01
es/full/all/es2019 120477953 ns/iter (± 521984) 120355838 ns/iter (± 885571) 1.00
es/full/all/es2020 116321465 ns/iter (± 566233) 115547845 ns/iter (± 436594) 1.01
es/full/parser 535292 ns/iter (± 6547) 526483 ns/iter (± 5367) 1.02
es/full/base/fixer 19671 ns/iter (± 193) 20140 ns/iter (± 107) 0.98
es/full/base/resolver_and_hygiene 85403 ns/iter (± 195) 83757 ns/iter (± 276) 1.02
serialization of serde 297 ns/iter (± 0) 295 ns/iter (± 0) 1.01
css/minify/libraries/bootstrap 29450853 ns/iter (± 293183) 28797636 ns/iter (± 72581) 1.02
css/visitor/compare/clone 1712964 ns/iter (± 5514) 1693659 ns/iter (± 16586) 1.01
css/visitor/compare/visit_mut_span 1845178 ns/iter (± 7347) 1824560 ns/iter (± 17497) 1.01
css/visitor/compare/visit_mut_span_panic 1929647 ns/iter (± 11333) 1876430 ns/iter (± 17745) 1.03
css/visitor/compare/fold_span 2577912 ns/iter (± 15981) 2582255 ns/iter (± 13928) 1.00
css/visitor/compare/fold_span_panic 2762036 ns/iter (± 7186) 2766792 ns/iter (± 14839) 1.00
css/lexer/bootstrap_5_1_3 4648705 ns/iter (± 5983) 4608537 ns/iter (± 3386) 1.01
css/lexer/foundation_6_7_4 3920893 ns/iter (± 2237) 3857436 ns/iter (± 1866) 1.02
css/lexer/tailwind_3_1_1 746962 ns/iter (± 475) 738993 ns/iter (± 464) 1.01
css/parser/bootstrap_5_1_3 19148589 ns/iter (± 183229) 19058714 ns/iter (± 42380) 1.00
css/parser/foundation_6_7_4 15316124 ns/iter (± 27611) 15347987 ns/iter (± 11814) 1.00
css/parser/tailwind_3_1_1 2913435 ns/iter (± 1789) 2930884 ns/iter (± 2950) 0.99
es/codegen/colors 733440 ns/iter (± 400781) 722995 ns/iter (± 393099) 1.01
es/codegen/large 2892828 ns/iter (± 1523784) 2891999 ns/iter (± 1545071) 1.00
es/codegen/with-parser/colors 44390 ns/iter (± 489) 44880 ns/iter (± 91) 0.99
es/codegen/with-parser/large 489356 ns/iter (± 1004) 488968 ns/iter (± 1084) 1.00
es/minify/libraries/antd 1191048973 ns/iter (± 25907467) 1141700476 ns/iter (± 10578722) 1.04
es/minify/libraries/d3 253950864 ns/iter (± 2733798) 242734458 ns/iter (± 1312939) 1.05
es/minify/libraries/echarts 942066026 ns/iter (± 25397536) 910753750 ns/iter (± 34154454) 1.03
es/minify/libraries/jquery 74734139 ns/iter (± 622753) 76867173 ns/iter (± 855498) 0.97
es/minify/libraries/lodash 88751083 ns/iter (± 410413) 89935728 ns/iter (± 435082) 0.99
es/minify/libraries/moment 44056787 ns/iter (± 179257) 44160429 ns/iter (± 79366) 1.00
es/minify/libraries/react 16110327 ns/iter (± 56418) 16267520 ns/iter (± 53936) 0.99
es/minify/libraries/terser 188590373 ns/iter (± 995434) 189589478 ns/iter (± 552708) 0.99
es/minify/libraries/three 321850788 ns/iter (± 6200601) 324703745 ns/iter (± 3794663) 0.99
es/minify/libraries/typescript 2303840812 ns/iter (± 14029014) 2371269257 ns/iter (± 66035909) 0.97
es/minify/libraries/victory 470896067 ns/iter (± 2118189) 487216603 ns/iter (± 15072751) 0.97
es/minify/libraries/vue 107778331 ns/iter (± 359206) 108813773 ns/iter (± 722593) 0.99
es/visitor/compare/clone 1988596 ns/iter (± 5063) 1959743 ns/iter (± 4504) 1.01
es/visitor/compare/visit_mut_span 2320506 ns/iter (± 3757) 2281708 ns/iter (± 4256) 1.02
es/visitor/compare/visit_mut_span_panic 2374276 ns/iter (± 4902) 2339878 ns/iter (± 4568) 1.01
es/visitor/compare/fold_span 3431068 ns/iter (± 5499) 3423006 ns/iter (± 7270) 1.00
es/visitor/compare/fold_span_panic 3550606 ns/iter (± 6234) 3543661 ns/iter (± 6764) 1.00
es/lexer/colors 12830 ns/iter (± 45) 12738 ns/iter (± 30) 1.01
es/lexer/angular 6082089 ns/iter (± 14273) 6117497 ns/iter (± 3668) 0.99
es/lexer/backbone 811715 ns/iter (± 509) 797706 ns/iter (± 267) 1.02
es/lexer/jquery 4470623 ns/iter (± 1870) 4466380 ns/iter (± 4095) 1.00
es/lexer/jquery mobile 6851123 ns/iter (± 5587) 6796666 ns/iter (± 19308) 1.01
es/lexer/mootools 3567117 ns/iter (± 970) 3554143 ns/iter (± 1796) 1.00
es/lexer/underscore 671197 ns/iter (± 2523) 732886 ns/iter (± 364) 0.92
es/lexer/three 21191589 ns/iter (± 16844) 21010608 ns/iter (± 22029) 1.01
es/lexer/yui 3819344 ns/iter (± 2073) 3838040 ns/iter (± 1753) 1.00
es/parser/colors 26579 ns/iter (± 115) 26606 ns/iter (± 71) 1.00
es/parser/angular 13548160 ns/iter (± 73784) 13497575 ns/iter (± 68325) 1.00
es/parser/backbone 2014529 ns/iter (± 16756) 2014169 ns/iter (± 11140) 1.00
es/parser/jquery 11130746 ns/iter (± 273555) 10876369 ns/iter (± 47244) 1.02
es/parser/jquery mobile 16853269 ns/iter (± 305301) 16735205 ns/iter (± 88712) 1.01
es/parser/mootools 8434073 ns/iter (± 34171) 8429118 ns/iter (± 34456) 1.00
es/parser/underscore 1731804 ns/iter (± 12162) 1732730 ns/iter (± 9619) 1.00
es/parser/three 47062372 ns/iter (± 883192) 46683519 ns/iter (± 219570) 1.01
es/parser/yui 8458982 ns/iter (± 102144) 8304796 ns/iter (± 30764) 1.02
es/preset-env/usage/builtin_type 140797 ns/iter (± 32848) 139787 ns/iter (± 33197) 1.01
es/preset-env/usage/property 17337 ns/iter (± 82) 17191 ns/iter (± 34) 1.01
es/resolver/typescript 89646556 ns/iter (± 792110) 87906223 ns/iter (± 1307002) 1.02
es/fixer/typescript 63910581 ns/iter (± 1407895) 63378406 ns/iter (± 1221897) 1.01
es/hygiene/typescript 141563577 ns/iter (± 3380799) 134930009 ns/iter (± 959880) 1.05
es/resolver_with_hygiene/typescript 254923448 ns/iter (± 5560414) 244650850 ns/iter (± 1187020) 1.04
es/visitor/base-perf/module_clone 66772 ns/iter (± 254) 60700 ns/iter (± 204) 1.10
es/visitor/base-perf/fold_empty 69335 ns/iter (± 218) 64836 ns/iter (± 200) 1.07
es/visitor/base-perf/fold_noop_impl_all 69415 ns/iter (± 291) 64902 ns/iter (± 319) 1.07
es/visitor/base-perf/fold_noop_impl_vec 69595 ns/iter (± 604) 65325 ns/iter (± 405) 1.07
es/visitor/base-perf/boxing_boxed_clone 58 ns/iter (± 0) 58 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed_clone 39 ns/iter (± 0) 39 ns/iter (± 0) 1
es/visitor/base-perf/boxing_boxed 106 ns/iter (± 0) 106 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed 76 ns/iter (± 0) 75 ns/iter (± 0) 1.01
es/visitor/base-perf/visit_empty 0 ns/iter (± 0) 0 ns/iter (± 0) NaN
es/visitor/base-perf/visit_contains_this 2511 ns/iter (± 11) 2546 ns/iter (± 20) 0.99
es/base/parallel/resolver/typescript 4298767888 ns/iter (± 271960910) 4375567218 ns/iter (± 212496374) 0.98
es/base/parallel/hygiene/typescript 1496829585 ns/iter (± 30879364) 1482528905 ns/iter (± 28418557) 1.01
misc/visitors/time-complexity/time 5 136 ns/iter (± 2) 134 ns/iter (± 1) 1.01
misc/visitors/time-complexity/time 10 383 ns/iter (± 12) 397 ns/iter (± 14) 0.96
misc/visitors/time-complexity/time 15 679 ns/iter (± 5) 710 ns/iter (± 22) 0.96
misc/visitors/time-complexity/time 20 1066 ns/iter (± 6) 1019 ns/iter (± 49) 1.05
misc/visitors/time-complexity/time 40 3480 ns/iter (± 33) 3487 ns/iter (± 20) 1.00
misc/visitors/time-complexity/time 60 7251 ns/iter (± 15) 7244 ns/iter (± 18) 1.00
es/full-target/es2016 239617 ns/iter (± 1001) 240167 ns/iter (± 918) 1.00
es/full-target/es2017 227381 ns/iter (± 722) 226390 ns/iter (± 1418) 1.00
es/full-target/es2018 216011 ns/iter (± 531) 215188 ns/iter (± 1084) 1.00
es2020_nullish_coalescing 71437 ns/iter (± 432) 71454 ns/iter (± 460) 1.00
es2020_optional_chaining 81462 ns/iter (± 303) 81675 ns/iter (± 243) 1.00
es2022_class_properties 120193 ns/iter (± 520) 120449 ns/iter (± 250) 1.00
es2018_object_rest_spread 75172 ns/iter (± 371) 75653 ns/iter (± 263) 0.99
es2019_optional_catch_binding 63280 ns/iter (± 299) 63885 ns/iter (± 198) 0.99
es2017_async_to_generator 64568 ns/iter (± 162) 65205 ns/iter (± 142) 0.99
es2016_exponentiation 68636 ns/iter (± 190) 69413 ns/iter (± 255) 0.99
es2015_arrow 71420 ns/iter (± 294) 72268 ns/iter (± 172) 0.99
es2015_block_scoped_fn 69049 ns/iter (± 203) 70053 ns/iter (± 420) 0.99
es2015_block_scoping 124073 ns/iter (± 507) 124627 ns/iter (± 477) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.