-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/minifier): Abort seq inliner if a same var is defined in outer…
… scope (#7772) **Description:** The algorithm here is directly copied from terser, I don't if it's correct or can be improved, but it does fix the issue. **Related issue:** - Closes #7749
- Loading branch information
Showing
19 changed files
with
180 additions
and
120 deletions.
There are no files selected for viewing
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.
ef8d121
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
299712
ns/iter (± 11532
)302433
ns/iter (± 9145
)0.99
es/full/minify/libraries/antd
1394631089
ns/iter (± 18613016
)1399873141
ns/iter (± 26662433
)1.00
es/full/minify/libraries/d3
302419949
ns/iter (± 5095944
)291312214
ns/iter (± 6362275
)1.04
es/full/minify/libraries/echarts
1137580764
ns/iter (± 24783375
)1121744008
ns/iter (± 16769582
)1.01
es/full/minify/libraries/jquery
87629996
ns/iter (± 982207
)87516659
ns/iter (± 1008232
)1.00
es/full/minify/libraries/lodash
102063730
ns/iter (± 1767861
)101006557
ns/iter (± 924613
)1.01
es/full/minify/libraries/moment
51367819
ns/iter (± 629236
)51160206
ns/iter (± 329732
)1.00
es/full/minify/libraries/react
18456412
ns/iter (± 165722
)18333372
ns/iter (± 157213
)1.01
es/full/minify/libraries/terser
234136784
ns/iter (± 4056186
)227732829
ns/iter (± 2162244
)1.03
es/full/minify/libraries/three
413849425
ns/iter (± 6739863
)404394957
ns/iter (± 5900297
)1.02
es/full/minify/libraries/typescript
2822062594
ns/iter (± 19076403
)2775790289
ns/iter (± 18303733
)1.02
es/full/minify/libraries/victory
617819051
ns/iter (± 18509842
)605374987
ns/iter (± 9628579
)1.02
es/full/minify/libraries/vue
126742550
ns/iter (± 2980845
)124300327
ns/iter (± 823100
)1.02
es/full/codegen/es3
33559
ns/iter (± 81
)36047
ns/iter (± 105
)0.93
es/full/codegen/es5
33453
ns/iter (± 75
)36025
ns/iter (± 87
)0.93
es/full/codegen/es2015
33416
ns/iter (± 48
)36046
ns/iter (± 61
)0.93
es/full/codegen/es2016
33414
ns/iter (± 107
)36097
ns/iter (± 64
)0.93
es/full/codegen/es2017
33483
ns/iter (± 91
)36010
ns/iter (± 53
)0.93
es/full/codegen/es2018
33459
ns/iter (± 75
)36055
ns/iter (± 97
)0.93
es/full/codegen/es2019
33461
ns/iter (± 58
)36076
ns/iter (± 119
)0.93
es/full/codegen/es2020
33459
ns/iter (± 92
)36057
ns/iter (± 47
)0.93
es/full/all/es3
172276978
ns/iter (± 1487369
)174093278
ns/iter (± 2233691
)0.99
es/full/all/es5
165624013
ns/iter (± 1086043
)164980742
ns/iter (± 945991
)1.00
es/full/all/es2015
123850732
ns/iter (± 703935
)125059279
ns/iter (± 657863
)0.99
es/full/all/es2016
123298297
ns/iter (± 723889
)124827361
ns/iter (± 1266109
)0.99
es/full/all/es2017
121849202
ns/iter (± 865918
)123924999
ns/iter (± 647447
)0.98
es/full/all/es2018
120433284
ns/iter (± 772849
)121269638
ns/iter (± 783413
)0.99
es/full/all/es2019
119539674
ns/iter (± 1004071
)121101010
ns/iter (± 745090
)0.99
es/full/all/es2020
114590260
ns/iter (± 642664
)116165562
ns/iter (± 663064
)0.99
es/full/parser
531729
ns/iter (± 4949
)538747
ns/iter (± 4466
)0.99
es/full/base/fixer
20523
ns/iter (± 302
)17702
ns/iter (± 180
)1.16
es/full/base/resolver_and_hygiene
82519
ns/iter (± 186
)82471
ns/iter (± 234
)1.00
serialization of serde
290
ns/iter (± 0
)297
ns/iter (± 1
)0.98
css/minify/libraries/bootstrap
30058238
ns/iter (± 361468
)29117016
ns/iter (± 308612
)1.03
css/visitor/compare/clone
1644864
ns/iter (± 6686
)1650069
ns/iter (± 9312
)1.00
css/visitor/compare/visit_mut_span
1781529
ns/iter (± 10874
)1776326
ns/iter (± 13315
)1.00
css/visitor/compare/visit_mut_span_panic
1852683
ns/iter (± 4170
)1860611
ns/iter (± 16797
)1.00
css/visitor/compare/fold_span
2615145
ns/iter (± 16861
)2588210
ns/iter (± 15179
)1.01
css/visitor/compare/fold_span_panic
2803104
ns/iter (± 34289
)2794161
ns/iter (± 20725
)1.00
css/lexer/bootstrap_5_1_3
4554118
ns/iter (± 5067
)4690502
ns/iter (± 2847
)0.97
css/lexer/foundation_6_7_4
3835552
ns/iter (± 3004
)3952392
ns/iter (± 3716
)0.97
css/lexer/tailwind_3_1_1
729151
ns/iter (± 324
)747301
ns/iter (± 3480
)0.98
css/parser/bootstrap_5_1_3
19473371
ns/iter (± 121937
)19152111
ns/iter (± 162428
)1.02
css/parser/foundation_6_7_4
15343105
ns/iter (± 941742
)15358295
ns/iter (± 85763
)1.00
css/parser/tailwind_3_1_1
2931218
ns/iter (± 39326
)2943144
ns/iter (± 3661
)1.00
es/codegen/colors
722797
ns/iter (± 397033
)738049
ns/iter (± 404528
)0.98
es/codegen/large
2918435
ns/iter (± 1541553
)2900987
ns/iter (± 1547003
)1.01
es/codegen/with-parser/colors
45478
ns/iter (± 620
)45372
ns/iter (± 520
)1.00
es/codegen/with-parser/large
489493
ns/iter (± 1355
)486708
ns/iter (± 2029
)1.01
es/minify/libraries/antd
1242606014
ns/iter (± 25169138
)1241382474
ns/iter (± 18047835
)1.00
es/minify/libraries/d3
255780279
ns/iter (± 6807460
)254413302
ns/iter (± 5978669
)1.01
es/minify/libraries/echarts
996370504
ns/iter (± 23538535
)986100649
ns/iter (± 16946437
)1.01
es/minify/libraries/jquery
75932903
ns/iter (± 555420
)76071910
ns/iter (± 549340
)1.00
es/minify/libraries/lodash
90428196
ns/iter (± 399630
)91121971
ns/iter (± 963681
)0.99
es/minify/libraries/moment
44681947
ns/iter (± 388386
)44653739
ns/iter (± 297601
)1.00
es/minify/libraries/react
16354682
ns/iter (± 156272
)16383704
ns/iter (± 136079
)1.00
es/minify/libraries/terser
195367956
ns/iter (± 1864302
)198162204
ns/iter (± 3780905
)0.99
es/minify/libraries/three
342422021
ns/iter (± 5546330
)347940277
ns/iter (± 7834524
)0.98
es/minify/libraries/typescript
2377877713
ns/iter (± 20813513
)2426803576
ns/iter (± 19302326
)0.98
es/minify/libraries/victory
514082512
ns/iter (± 6690608
)515399876
ns/iter (± 19246828
)1.00
es/minify/libraries/vue
109985116
ns/iter (± 1103594
)111230463
ns/iter (± 1349909
)0.99
es/visitor/compare/clone
1987662
ns/iter (± 9582
)1953709
ns/iter (± 5632
)1.02
es/visitor/compare/visit_mut_span
2335438
ns/iter (± 7790
)2316003
ns/iter (± 8172
)1.01
es/visitor/compare/visit_mut_span_panic
2367441
ns/iter (± 28112
)2342280
ns/iter (± 6730
)1.01
es/visitor/compare/fold_span
3411996
ns/iter (± 25372
)3378086
ns/iter (± 27117
)1.01
es/visitor/compare/fold_span_panic
3536757
ns/iter (± 44235
)3531839
ns/iter (± 85109
)1.00
es/lexer/colors
12865
ns/iter (± 17
)12876
ns/iter (± 49
)1.00
es/lexer/angular
6004294
ns/iter (± 6027
)5999244
ns/iter (± 10299
)1.00
es/lexer/backbone
770668
ns/iter (± 2712
)787497
ns/iter (± 1164
)0.98
es/lexer/jquery
4375412
ns/iter (± 4591
)4445509
ns/iter (± 5595
)0.98
es/lexer/jquery mobile
6707206
ns/iter (± 4530
)6726624
ns/iter (± 4858
)1.00
es/lexer/mootools
3464410
ns/iter (± 4578
)3502611
ns/iter (± 2250
)0.99
es/lexer/underscore
647259
ns/iter (± 648
)655692
ns/iter (± 297
)0.99
es/lexer/three
20826154
ns/iter (± 33028
)20982538
ns/iter (± 21406
)0.99
es/lexer/yui
3756131
ns/iter (± 1188
)3820452
ns/iter (± 1047
)0.98
es/parser/colors
27219
ns/iter (± 54
)27411
ns/iter (± 97
)0.99
es/parser/angular
13908487
ns/iter (± 162043
)13988857
ns/iter (± 190785
)0.99
es/parser/backbone
2023335
ns/iter (± 4014
)2020847
ns/iter (± 12071
)1.00
es/parser/jquery
11300653
ns/iter (± 269748
)11328541
ns/iter (± 168646
)1.00
es/parser/jquery mobile
17344700
ns/iter (± 359685
)17481954
ns/iter (± 308913
)0.99
es/parser/mootools
8545234
ns/iter (± 67523
)8545984
ns/iter (± 36529
)1.00
es/parser/underscore
1741986
ns/iter (± 11420
)1763528
ns/iter (± 9932
)0.99
es/parser/three
49239028
ns/iter (± 732146
)50346530
ns/iter (± 641954
)0.98
es/parser/yui
8453282
ns/iter (± 99648
)8476583
ns/iter (± 68927
)1.00
es/preset-env/usage/builtin_type
138407
ns/iter (± 33241
)134281
ns/iter (± 31092
)1.03
es/preset-env/usage/property
16677
ns/iter (± 73
)17406
ns/iter (± 50
)0.96
es/resolver/typescript
90534643
ns/iter (± 1558133
)92813227
ns/iter (± 1636992
)0.98
es/fixer/typescript
64557092
ns/iter (± 841588
)66887425
ns/iter (± 1248527
)0.97
es/hygiene/typescript
135372924
ns/iter (± 1688939
)135795133
ns/iter (± 1851047
)1.00
es/resolver_with_hygiene/typescript
252522879
ns/iter (± 4801228
)255711547
ns/iter (± 4948268
)0.99
es/visitor/base-perf/module_clone
58970
ns/iter (± 323
)58504
ns/iter (± 367
)1.01
es/visitor/base-perf/fold_empty
63315
ns/iter (± 797
)62826
ns/iter (± 497
)1.01
es/visitor/base-perf/fold_noop_impl_all
62726
ns/iter (± 491
)63758
ns/iter (± 248
)0.98
es/visitor/base-perf/fold_noop_impl_vec
63412
ns/iter (± 170
)63377
ns/iter (± 413
)1.00
es/visitor/base-perf/boxing_boxed_clone
57
ns/iter (± 0
)57
ns/iter (± 0
)1
es/visitor/base-perf/boxing_unboxed_clone
40
ns/iter (± 0
)39
ns/iter (± 0
)1.03
es/visitor/base-perf/boxing_boxed
106
ns/iter (± 0
)108
ns/iter (± 0
)0.98
es/visitor/base-perf/boxing_unboxed
75
ns/iter (± 0
)78
ns/iter (± 0
)0.96
es/visitor/base-perf/visit_empty
0
ns/iter (± 0
)0
ns/iter (± 0
)NaN
es/visitor/base-perf/visit_contains_this
2432
ns/iter (± 12
)2528
ns/iter (± 14
)0.96
es/base/parallel/resolver/typescript
3645814264
ns/iter (± 231872778
)3941748667
ns/iter (± 317076874
)0.92
es/base/parallel/hygiene/typescript
1458012924
ns/iter (± 17085985
)1471490128
ns/iter (± 15547190
)0.99
misc/visitors/time-complexity/time 5
137
ns/iter (± 8
)132
ns/iter (± 7
)1.04
misc/visitors/time-complexity/time 10
372
ns/iter (± 8
)291
ns/iter (± 0
)1.28
misc/visitors/time-complexity/time 15
674
ns/iter (± 3
)690
ns/iter (± 1
)0.98
misc/visitors/time-complexity/time 20
1052
ns/iter (± 28
)1063
ns/iter (± 21
)0.99
misc/visitors/time-complexity/time 40
3705
ns/iter (± 64
)3563
ns/iter (± 8
)1.04
misc/visitors/time-complexity/time 60
7715
ns/iter (± 64
)7313
ns/iter (± 36
)1.05
es/full-target/es2016
231134
ns/iter (± 810
)229350
ns/iter (± 469
)1.01
es/full-target/es2017
218523
ns/iter (± 461
)217123
ns/iter (± 622
)1.01
es/full-target/es2018
206198
ns/iter (± 523
)206458
ns/iter (± 800
)1.00
es2020_nullish_coalescing
71468
ns/iter (± 330
)70588
ns/iter (± 509
)1.01
es2020_optional_chaining
83657
ns/iter (± 370
)83406
ns/iter (± 474
)1.00
es2022_class_properties
114673
ns/iter (± 185
)115355
ns/iter (± 328
)0.99
es2018_object_rest_spread
75465
ns/iter (± 426
)74989
ns/iter (± 537
)1.01
es2019_optional_catch_binding
65574
ns/iter (± 244
)65378
ns/iter (± 234
)1.00
es2017_async_to_generator
65455
ns/iter (± 241
)63908
ns/iter (± 211
)1.02
es2016_exponentiation
69724
ns/iter (± 314
)69324
ns/iter (± 276
)1.01
es2015_arrow
73264
ns/iter (± 275
)72891
ns/iter (± 343
)1.01
es2015_block_scoped_fn
69774
ns/iter (± 263
)69544
ns/iter (± 320
)1.00
es2015_block_scoping
123642
ns/iter (± 671
)123400
ns/iter (± 390
)1.00
This comment was automatically generated by workflow using github-action-benchmark.