Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(es/minfiier): Compute more with sequential inliner (#6169)
- Loading branch information
Showing
44 changed files
with
257 additions
and
124 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
crates/swc/tests/tsc-references/compoundAdditionAssignmentLHSCanBeAssigned.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//// [compoundAdditionAssignmentLHSCanBeAssigned.ts] | ||
var E, a, b, x1, x2, x3, x4, x6; | ||
var E; | ||
!function(E) { | ||
E[E.a = 0] = "a", E[E.b = 1] = "b"; | ||
}(E || (E = {})), x1 += a, x1 += b, x1 += !0, x1 += 0, x1 += "", x1 += E.a, x1 += {}, x1 += null, x1 += void 0, x2 += a, x2 += b, x2 += !0, x2 += 0, x2 += "", x2 += E.a, x2 += {}, x2 += null, x2 += void 0, x3 += a, x3 += 0, x3 += E.a, x3 += null, x3 += void 0, x4 += a, x4 += 0, x4 += E.a, x4 += null, x4 += void 0, x6 += a, x6 += ""; | ||
}(E || (E = {})), E.a, E.a, E.a, E.a; |
4 changes: 2 additions & 2 deletions
4
crates/swc/tests/tsc-references/compoundAdditionAssignmentWithInvalidOperands.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//// [compoundAdditionAssignmentWithInvalidOperands.ts] | ||
var E, a, x1, x2, x3, x4, x5; | ||
var E; | ||
!function(E) { | ||
E[E.a = 0] = "a", E[E.b = 1] = "b"; | ||
}(E || (E = {})), x1 += a, x1 += !0, x1 += 0, x1 += E.a, x1 += {}, x1 += null, x1 += void 0, x2 += a, x2 += !0, x2 += 0, x2 += E.a, x2 += {}, x2 += null, x2 += void 0, x3 += a, x3 += !0, x3 += 0, x3 += E.a, x3 += {}, x3 += null, x3 += void 0, x4 += a, x4 += !0, x4 += {}, x5 += a, x5 += !0, x5 += {}; | ||
}(E || (E = {})), E.a, E.a, E.a; |
4 changes: 2 additions & 2 deletions
4
crates/swc/tests/tsc-references/compoundArithmeticAssignmentLHSCanBeAssigned.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//// [compoundArithmeticAssignmentLHSCanBeAssigned.ts] | ||
var E, a, b, c, x1, x2, x3; | ||
var E; | ||
!function(E) { | ||
E[E.a = 0] = "a", E[E.b = 1] = "b", E[E.c = 2] = "c"; | ||
}(E || (E = {})), x1 *= a, x1 *= b, x1 *= c, x1 *= null, x1 *= void 0, x2 *= a, x2 *= b, x2 *= c, x2 *= null, x2 *= void 0, x3 *= a, x3 *= b, x3 *= c, x3 *= null, x3 *= void 0; | ||
}(E || (E = {})); |
4 changes: 2 additions & 2 deletions
4
...es/swc/tests/tsc-references/compoundArithmeticAssignmentWithInvalidOperands.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//// [compoundArithmeticAssignmentWithInvalidOperands.ts] | ||
var E, a, b, x1, x2, x3, x4, x5, x6; | ||
var E; | ||
!function(E) { | ||
E[E.a = 0] = "a", E[E.b = 1] = "b"; | ||
}(E || (E = {})), x1 *= a, x1 *= b, x1 *= !0, x1 *= 0, x1 *= "", x1 *= E.a, x1 *= {}, x1 *= null, x1 *= void 0, x2 *= a, x2 *= b, x2 *= !0, x2 *= 0, x2 *= "", x2 *= E.a, x2 *= {}, x2 *= null, x2 *= void 0, x3 *= a, x3 *= b, x3 *= !0, x3 *= 0, x3 *= "", x3 *= E.a, x3 *= {}, x3 *= null, x3 *= void 0, x4 *= a, x4 *= b, x4 *= !0, x4 *= 0, x4 *= "", x4 *= E.a, x4 *= {}, x4 *= null, x4 *= void 0, x5 *= b, x5 *= !0, x5 *= "", x5 *= {}, x6 *= b, x6 *= !0, x6 *= "", x6 *= {}; | ||
}(E || (E = {})), E.a, E.a, E.a, E.a; |
4 changes: 2 additions & 2 deletions
4
crates/swc/tests/tsc-references/destructuringControlFlow.2.minified.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
//// [destructuringControlFlow.ts] | ||
(0, [ | ||
[ | ||
"foo" | ||
][1]).toUpperCase(); | ||
][1].toUpperCase(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
//// [symbolType12.ts] | ||
var s = Symbol.for("assign"), str = ""; | ||
s *= s, s *= 0, s /= s, s /= 0, s %= s, s %= 0, s += s, s += 0, s += "", str += s, s -= s, s -= 0, s <<= s, s <<= 0, s >>= s, s >>= 0, s >>>= s, s >>>= 0, s &= s, s &= 0, s ^= s, s ^= 0, s |= s, s |= 0, str += s || str; | ||
s *= 0, s /= s, s /= 0, s %= s, s %= 0, str += s = s + 0 + "", s -= s, s -= 0, s <<= s, s <<= 0, s >>= s, s >>= 0, s >>>= s, s >>>= 0, s &= s, s &= 0, s ^= s, s ^= 0, s |= s, s |= 0, str += s || str; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
743a1aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/bugs-1
338859
ns/iter (± 19165
)372969
ns/iter (± 197640
)0.91
es/full/minify/libraries/antd
1807361757
ns/iter (± 42942553
)1906719838
ns/iter (± 60376461
)0.95
es/full/minify/libraries/d3
383691809
ns/iter (± 12991801
)432136029
ns/iter (± 25410991
)0.89
es/full/minify/libraries/echarts
1541896169
ns/iter (± 24128297
)1617301679
ns/iter (± 41457861
)0.95
es/full/minify/libraries/jquery
97437574
ns/iter (± 3473725
)115021948
ns/iter (± 4587068
)0.85
es/full/minify/libraries/lodash
114406438
ns/iter (± 1436726
)132318824
ns/iter (± 6858028
)0.86
es/full/minify/libraries/moment
57999540
ns/iter (± 990658
)69577365
ns/iter (± 6560088
)0.83
es/full/minify/libraries/react
19392601
ns/iter (± 478067
)22625404
ns/iter (± 917119
)0.86
es/full/minify/libraries/terser
357911001
ns/iter (± 143841951
)355190095
ns/iter (± 21482023
)1.01
es/full/minify/libraries/three
538254061
ns/iter (± 10344689
)582006848
ns/iter (± 62832958
)0.92
es/full/minify/libraries/typescript
3398886400
ns/iter (± 77681435
)3613809306
ns/iter (± 66494279
)0.94
es/full/minify/libraries/victory
814345267
ns/iter (± 37635308
)862079462
ns/iter (± 42409133
)0.94
es/full/minify/libraries/vue
145270534
ns/iter (± 4043914
)172266290
ns/iter (± 23209983
)0.84
es/full/codegen/es3
33633
ns/iter (± 1450
)32783
ns/iter (± 422
)1.03
es/full/codegen/es5
33333
ns/iter (± 3277
)32785
ns/iter (± 835
)1.02
es/full/codegen/es2015
33311
ns/iter (± 727
)32730
ns/iter (± 945
)1.02
es/full/codegen/es2016
33232
ns/iter (± 914
)32702
ns/iter (± 1034
)1.02
es/full/codegen/es2017
33261
ns/iter (± 1295
)32733
ns/iter (± 637
)1.02
es/full/codegen/es2018
33253
ns/iter (± 675
)32625
ns/iter (± 623
)1.02
es/full/codegen/es2019
33295
ns/iter (± 583
)32814
ns/iter (± 603
)1.01
es/full/codegen/es2020
33264
ns/iter (± 974
)32676
ns/iter (± 750
)1.02
es/full/all/es3
185946772
ns/iter (± 10381718
)212479827
ns/iter (± 11982743
)0.88
es/full/all/es5
176159583
ns/iter (± 2767116
)202692639
ns/iter (± 13238644
)0.87
es/full/all/es2015
141727264
ns/iter (± 3737441
)160011448
ns/iter (± 11551966
)0.89
es/full/all/es2016
140608961
ns/iter (± 4037461
)159959199
ns/iter (± 9424651
)0.88
es/full/all/es2017
140009277
ns/iter (± 2781809
)157933475
ns/iter (± 9065317
)0.89
es/full/all/es2018
138744681
ns/iter (± 4257324
)158479888
ns/iter (± 10422918
)0.88
es/full/all/es2019
137928365
ns/iter (± 3423663
)148375646
ns/iter (± 8929590
)0.93
es/full/all/es2020
132987276
ns/iter (± 3115723
)150443719
ns/iter (± 9757128
)0.88
es/full/parser
695014
ns/iter (± 64121
)734967
ns/iter (± 22701
)0.95
es/full/base/fixer
24891
ns/iter (± 1019
)26141
ns/iter (± 1232
)0.95
es/full/base/resolver_and_hygiene
87499
ns/iter (± 1637
)92924
ns/iter (± 3599
)0.94
serialization of ast node
208
ns/iter (± 4
)214
ns/iter (± 8
)0.97
serialization of serde
211
ns/iter (± 10
)220
ns/iter (± 8
)0.96
This comment was automatically generated by workflow using github-action-benchmark.