1
- use std:: { iter:: once, mem:: transmute} ;
1
+ use std:: {
2
+ iter:: once,
3
+ mem:: { take, transmute} ,
4
+ } ;
2
5
3
6
use rustc_hash:: FxHashMap ;
4
7
use swc_atoms:: JsWord ;
@@ -15,10 +18,25 @@ pub fn decorator_2022_03() -> impl VisitMut + Fold {
15
18
as_folder ( Decorator202203 :: default ( ) )
16
19
}
17
20
18
- #[ derive( Debug , Default ) ]
21
+ #[ derive( Default ) ]
19
22
struct Decorator202203 {
20
23
/// Variables without initializer.
21
24
extra_vars : Vec < VarDeclarator > ,
25
+
26
+ extra_lets : Vec < VarDeclarator > ,
27
+
28
+ state : ClassState ,
29
+
30
+ /// Prepended before the class
31
+ pre_class_inits : Vec < Box < Expr > > ,
32
+
33
+ rename_map : FxHashMap < Id , Id > ,
34
+
35
+ extra_exports : Vec < ExportSpecifier > ,
36
+ }
37
+
38
+ #[ derive( Default ) ]
39
+ struct ClassState {
22
40
static_lhs : Vec < Ident > ,
23
41
proto_lhs : Vec < Ident > ,
24
42
@@ -33,17 +51,8 @@ struct Decorator202203 {
33
51
/// Injected into static blocks.
34
52
extra_stmts : Vec < Stmt > ,
35
53
36
- /// Prepended before the class
37
- pre_class_inits : Vec < Box < Expr > > ,
38
-
39
54
class_lhs : Vec < Option < Pat > > ,
40
55
class_decorators : Vec < Option < ExprOrSpread > > ,
41
-
42
- extra_lets : Vec < VarDeclarator > ,
43
-
44
- extra_exports : Vec < ExportSpecifier > ,
45
-
46
- rename_map : FxHashMap < Id , Id > ,
47
56
}
48
57
49
58
impl Decorator202203 {
@@ -81,23 +90,28 @@ impl Decorator202203 {
81
90
82
91
/// Moves `cur_inits` to `extra_stmts`.
83
92
fn consume_inits ( & mut self ) {
84
- if self . init_proto_args . is_empty ( )
85
- && self . init_static_args . is_empty ( )
86
- && self . init_proto . is_none ( )
87
- && self . init_static . is_none ( )
88
- && self . class_decorators . is_empty ( )
93
+ if self . state . init_proto_args . is_empty ( )
94
+ && self . state . init_static_args . is_empty ( )
95
+ && self . state . init_proto . is_none ( )
96
+ && self . state . init_static . is_none ( )
97
+ && self . state . class_decorators . is_empty ( )
89
98
{
90
99
return ;
91
100
}
92
101
93
102
let mut e_lhs = vec ! [ ] ;
94
103
let mut combined_args = vec ! [ ThisExpr { span: DUMMY_SP } . as_arg( ) ] ;
95
104
96
- for id in self . static_lhs . drain ( ..) . chain ( self . proto_lhs . drain ( ..) ) {
105
+ for id in self
106
+ . state
107
+ . static_lhs
108
+ . drain ( ..)
109
+ . chain ( self . state . proto_lhs . drain ( ..) )
110
+ {
97
111
e_lhs. push ( Some ( id. into ( ) ) ) ;
98
112
}
99
113
100
- if let Some ( init) = self . init_proto . clone ( ) {
114
+ if let Some ( init) = self . state . init_proto . clone ( ) {
101
115
self . extra_vars . push ( VarDeclarator {
102
116
span : DUMMY_SP ,
103
117
name : Pat :: Ident ( init. clone ( ) . into ( ) ) ,
@@ -108,7 +122,7 @@ impl Decorator202203 {
108
122
e_lhs. push ( Some ( init. into ( ) ) ) ;
109
123
}
110
124
111
- if let Some ( init) = self . init_static . clone ( ) {
125
+ if let Some ( init) = self . state . init_static . clone ( ) {
112
126
self . extra_vars . push ( VarDeclarator {
113
127
span : DUMMY_SP ,
114
128
name : Pat :: Ident ( init. clone ( ) . into ( ) ) ,
@@ -123,9 +137,10 @@ impl Decorator202203 {
123
137
ArrayLit {
124
138
span : DUMMY_SP ,
125
139
elems : self
140
+ . state
126
141
. init_static_args
127
142
. drain ( ..)
128
- . chain ( self . init_proto_args . drain ( ..) )
143
+ . chain ( self . state . init_proto_args . drain ( ..) )
129
144
. collect ( ) ,
130
145
}
131
146
. as_arg ( ) ,
@@ -134,7 +149,7 @@ impl Decorator202203 {
134
149
combined_args. push (
135
150
ArrayLit {
136
151
span : DUMMY_SP ,
137
- elems : self . class_decorators . take ( ) ,
152
+ elems : self . state . class_decorators . take ( ) ,
138
153
}
139
154
. as_arg ( ) ,
140
155
) ;
@@ -153,14 +168,14 @@ impl Decorator202203 {
153
168
} ) )
154
169
} ;
155
170
156
- let c_pat = if self . class_lhs . is_empty ( ) {
171
+ let c_pat = if self . state . class_lhs . is_empty ( ) {
157
172
None
158
173
} else {
159
174
Some ( ObjectPatProp :: KeyValue ( KeyValuePatProp {
160
175
key : PropName :: Ident ( quote_ident ! ( "c" ) ) ,
161
176
value : Box :: new ( Pat :: Array ( ArrayPat {
162
177
span : DUMMY_SP ,
163
- elems : self . class_lhs . take ( ) ,
178
+ elems : self . state . class_lhs . take ( ) ,
164
179
type_ann : Default :: default ( ) ,
165
180
optional : false ,
166
181
} ) ) ,
@@ -184,13 +199,13 @@ impl Decorator202203 {
184
199
} ) ) ,
185
200
} ) ) ;
186
201
187
- self . extra_stmts . push ( Stmt :: Expr ( ExprStmt {
202
+ self . state . extra_stmts . push ( Stmt :: Expr ( ExprStmt {
188
203
span : DUMMY_SP ,
189
204
expr,
190
205
} ) ) ;
191
206
192
- if let Some ( init) = self . init_static . take ( ) {
193
- self . extra_stmts . push ( Stmt :: Expr ( ExprStmt {
207
+ if let Some ( init) = self . state . init_static . take ( ) {
208
+ self . state . extra_stmts . push ( Stmt :: Expr ( ExprStmt {
194
209
span : DUMMY_SP ,
195
210
expr : Box :: new ( Expr :: Call ( CallExpr {
196
211
span : DUMMY_SP ,
@@ -332,8 +347,10 @@ impl Decorator202203 {
332
347
replace_ident ( & mut class. body , ident. to_id ( ) , & new_class_name) ;
333
348
}
334
349
335
- self . class_lhs . push ( Some ( new_class_name. clone ( ) . into ( ) ) ) ;
336
- self . class_lhs . push ( Some ( init_class. clone ( ) . into ( ) ) ) ;
350
+ self . state
351
+ . class_lhs
352
+ . push ( Some ( new_class_name. clone ( ) . into ( ) ) ) ;
353
+ self . state . class_lhs . push ( Some ( init_class. clone ( ) . into ( ) ) ) ;
337
354
338
355
self . extra_vars . push ( VarDeclarator {
339
356
span : DUMMY_SP ,
@@ -343,7 +360,7 @@ impl Decorator202203 {
343
360
} ) ;
344
361
345
362
let decorators = self . preserve_side_effect_of_decorators ( class. decorators . take ( ) ) ;
346
- self . class_decorators . extend ( decorators) ;
363
+ self . state . class_decorators . extend ( decorators) ;
347
364
348
365
{
349
366
let call_stmt = CallExpr {
@@ -367,6 +384,8 @@ impl Decorator202203 {
367
384
}
368
385
369
386
fn handle_class_decl ( & mut self , c : & mut ClassDecl ) -> Option < Stmt > {
387
+ let old_state = take ( & mut self . state ) ;
388
+
370
389
if !c. class . decorators . is_empty ( ) {
371
390
let decorators = self . preserve_side_effect_of_decorators ( c. class . decorators . take ( ) ) ;
372
391
@@ -392,10 +411,12 @@ impl Decorator202203 {
392
411
self . rename_map
393
412
. insert ( c. ident . to_id ( ) , new_class_name. to_id ( ) ) ;
394
413
395
- self . class_lhs . push ( Some ( new_class_name. clone ( ) . into ( ) ) ) ;
396
- self . class_lhs . push ( Some ( init_class. clone ( ) . into ( ) ) ) ;
414
+ self . state
415
+ . class_lhs
416
+ . push ( Some ( new_class_name. clone ( ) . into ( ) ) ) ;
417
+ self . state . class_lhs . push ( Some ( init_class. clone ( ) . into ( ) ) ) ;
397
418
398
- self . class_decorators . extend ( decorators) ;
419
+ self . state . class_decorators . extend ( decorators) ;
399
420
400
421
let mut body = c. class . body . take ( ) ;
401
422
@@ -594,6 +615,8 @@ impl Decorator202203 {
594
615
implements : Default :: default ( ) ,
595
616
} ) ;
596
617
618
+ self . state = old_state;
619
+
597
620
return Some (
598
621
NewExpr {
599
622
span : DUMMY_SP ,
@@ -633,10 +656,14 @@ impl Decorator202203 {
633
656
} ,
634
657
} ) ) ;
635
658
659
+ self . state = old_state;
660
+
636
661
return Some ( Stmt :: Decl ( Decl :: Class ( c. take ( ) ) ) ) ;
637
662
}
638
663
}
639
664
665
+ self . state = old_state;
666
+
640
667
None
641
668
}
642
669
@@ -706,12 +733,12 @@ impl VisitMut for Decorator202203 {
706
733
noop_visit_mut_type ! ( ) ;
707
734
708
735
fn visit_mut_class ( & mut self , n : & mut Class ) {
709
- let old_stmts = self . extra_stmts . take ( ) ;
736
+ let old_stmts = self . state . extra_stmts . take ( ) ;
710
737
711
738
n. visit_mut_children_with ( self ) ;
712
739
713
- if !self . is_init_proto_called {
714
- if let Some ( init_proto) = self . init_proto . clone ( ) {
740
+ if !self . state . is_init_proto_called {
741
+ if let Some ( init_proto) = self . state . init_proto . clone ( ) {
715
742
let c = self . ensure_constructor ( n) ;
716
743
717
744
inject_after_super (
@@ -728,23 +755,23 @@ impl VisitMut for Decorator202203 {
728
755
729
756
self . consume_inits ( ) ;
730
757
731
- if !self . extra_stmts . is_empty ( ) {
758
+ if !self . state . extra_stmts . is_empty ( ) {
732
759
n. body . insert (
733
760
0 ,
734
761
ClassMember :: StaticBlock ( StaticBlock {
735
762
span : DUMMY_SP ,
736
763
body : BlockStmt {
737
764
span : DUMMY_SP ,
738
- stmts : self . extra_stmts . take ( ) ,
765
+ stmts : self . state . extra_stmts . take ( ) ,
739
766
} ,
740
767
} ) ,
741
768
) ;
742
769
}
743
770
744
- self . init_proto = None ;
745
- self . is_init_proto_called = false ;
771
+ self . state . init_proto = None ;
772
+ self . state . is_init_proto_called = false ;
746
773
747
- self . extra_stmts = old_stmts;
774
+ self . state . extra_stmts = old_stmts;
748
775
}
749
776
750
777
fn visit_mut_class_member ( & mut self , n : & mut ClassMember ) {
@@ -768,10 +795,12 @@ impl VisitMut for Decorator202203 {
768
795
} ) ;
769
796
770
797
if p. is_static {
771
- self . init_static
798
+ self . state
799
+ . init_static
772
800
. get_or_insert_with ( || private_ident ! ( "_initStatic" ) ) ;
773
801
} else {
774
- self . init_proto
802
+ self . state
803
+ . init_proto
775
804
. get_or_insert_with ( || private_ident ! ( "_initProto" ) ) ;
776
805
}
777
806
@@ -808,15 +837,15 @@ impl VisitMut for Decorator202203 {
808
837
. as_arg ( ) ,
809
838
) ;
810
839
if p. is_static {
811
- self . init_static_args . push ( arg) ;
840
+ self . state . init_static_args . push ( arg) ;
812
841
} else {
813
- self . init_proto_args . push ( arg) ;
842
+ self . state . init_proto_args . push ( arg) ;
814
843
}
815
844
816
845
if p. is_static {
817
- self . static_lhs . push ( init. clone ( ) ) ;
846
+ self . state . static_lhs . push ( init. clone ( ) ) ;
818
847
} else {
819
- self . proto_lhs . push ( init. clone ( ) ) ;
848
+ self . state . proto_lhs . push ( init. clone ( ) ) ;
820
849
}
821
850
822
851
match p. kind {
@@ -920,23 +949,25 @@ impl VisitMut for Decorator202203 {
920
949
value : if accessor. decorators . is_empty ( ) {
921
950
accessor. value
922
951
} else {
923
- let init_proto = if self . is_init_proto_called || accessor. is_static {
924
- None
925
- } else {
926
- self . is_init_proto_called = true ;
927
-
928
- let init_proto = self
929
- . init_proto
930
- . get_or_insert_with ( || private_ident ! ( "_initProto" ) )
931
- . clone ( ) ;
932
-
933
- Some ( Box :: new ( Expr :: Call ( CallExpr {
934
- span : DUMMY_SP ,
935
- callee : init_proto. clone ( ) . as_callee ( ) ,
936
- args : vec ! [ ThisExpr { span: DUMMY_SP } . as_arg( ) ] ,
937
- type_args : Default :: default ( ) ,
938
- } ) ) )
939
- } ;
952
+ let init_proto =
953
+ if self . state . is_init_proto_called || accessor. is_static {
954
+ None
955
+ } else {
956
+ self . state . is_init_proto_called = true ;
957
+
958
+ let init_proto = self
959
+ . state
960
+ . init_proto
961
+ . get_or_insert_with ( || private_ident ! ( "_initProto" ) )
962
+ . clone ( ) ;
963
+
964
+ Some ( Box :: new ( Expr :: Call ( CallExpr {
965
+ span : DUMMY_SP ,
966
+ callee : init_proto. clone ( ) . as_callee ( ) ,
967
+ args : vec ! [ ThisExpr { span: DUMMY_SP } . as_arg( ) ] ,
968
+ type_args : Default :: default ( ) ,
969
+ } ) ) )
970
+ } ;
940
971
941
972
let init_call = Box :: new ( Expr :: Call ( CallExpr {
942
973
span : DUMMY_SP ,
@@ -1161,22 +1192,26 @@ impl VisitMut for Decorator202203 {
1161
1192
} ;
1162
1193
1163
1194
if accessor. is_static {
1164
- self . static_lhs . push ( init) ;
1165
- self . init_static_args . push ( Some ( initialize_init) ) ;
1166
- self . static_lhs
1195
+ self . state . static_lhs . push ( init) ;
1196
+ self . state . init_static_args . push ( Some ( initialize_init) ) ;
1197
+ self . state
1198
+ . static_lhs
1167
1199
. extend ( getter_var. into_iter ( ) . chain ( setter_var) ) ;
1168
1200
} else {
1169
- self . proto_lhs . push ( init) ;
1170
- self . init_proto_args . push ( Some ( initialize_init) ) ;
1171
- self . proto_lhs
1201
+ self . state . proto_lhs . push ( init) ;
1202
+ self . state . init_proto_args . push ( Some ( initialize_init) ) ;
1203
+ self . state
1204
+ . proto_lhs
1172
1205
. extend ( getter_var. into_iter ( ) . chain ( setter_var) ) ;
1173
1206
}
1174
1207
1175
1208
if accessor. is_static {
1176
- self . init_static
1209
+ self . state
1210
+ . init_static
1177
1211
. get_or_insert_with ( || private_ident ! ( "_initStatic" ) ) ;
1178
1212
} else {
1179
- self . init_proto
1213
+ self . state
1214
+ . init_proto
1180
1215
. get_or_insert_with ( || private_ident ! ( "_initProto" ) ) ;
1181
1216
}
1182
1217
}
@@ -1283,10 +1318,12 @@ impl VisitMut for Decorator202203 {
1283
1318
let ( name, _init) = self . initializer_name ( & mut n. key , "call" ) ;
1284
1319
1285
1320
if n. is_static {
1286
- self . init_static
1321
+ self . state
1322
+ . init_static
1287
1323
. get_or_insert_with ( || private_ident ! ( "_initStatic" ) ) ;
1288
1324
} else {
1289
- self . init_proto
1325
+ self . state
1326
+ . init_proto
1290
1327
. get_or_insert_with ( || private_ident ! ( "_initProto" ) ) ;
1291
1328
}
1292
1329
@@ -1312,9 +1349,9 @@ impl VisitMut for Decorator202203 {
1312
1349
. as_arg ( ) ,
1313
1350
) ;
1314
1351
if n. is_static {
1315
- self . init_static_args . push ( arg) ;
1352
+ self . state . init_static_args . push ( arg) ;
1316
1353
} else {
1317
- self . init_proto_args . push ( arg) ;
1354
+ self . state . init_proto_args . push ( arg) ;
1318
1355
}
1319
1356
}
1320
1357
@@ -1361,11 +1398,11 @@ impl VisitMut for Decorator202203 {
1361
1398
} ;
1362
1399
1363
1400
if p. is_static {
1364
- self . static_lhs . push ( init) ;
1365
- self . init_static_args . push ( initialize_init) ;
1401
+ self . state . static_lhs . push ( init) ;
1402
+ self . state . init_static_args . push ( initialize_init) ;
1366
1403
} else {
1367
- self . proto_lhs . push ( init) ;
1368
- self . init_proto_args . push ( initialize_init) ;
1404
+ self . state . proto_lhs . push ( init) ;
1405
+ self . state . init_proto_args . push ( initialize_init) ;
1369
1406
}
1370
1407
}
1371
1408
@@ -1586,11 +1623,11 @@ impl VisitMut for Decorator202203 {
1586
1623
} ;
1587
1624
1588
1625
if p. is_static {
1589
- self . static_lhs . push ( init) ;
1590
- self . init_static_args . push ( Some ( initialize_init) ) ;
1626
+ self . state . static_lhs . push ( init) ;
1627
+ self . state . init_static_args . push ( Some ( initialize_init) ) ;
1591
1628
} else {
1592
- self . proto_lhs . push ( init) ;
1593
- self . init_proto_args . push ( Some ( initialize_init) ) ;
1629
+ self . state . proto_lhs . push ( init) ;
1630
+ self . state . init_proto_args . push ( Some ( initialize_init) ) ;
1594
1631
}
1595
1632
}
1596
1633
@@ -1608,9 +1645,9 @@ impl VisitMut for Decorator202203 {
1608
1645
}
1609
1646
1610
1647
fn visit_mut_stmts ( & mut self , n : & mut Vec < Stmt > ) {
1648
+ let old_state = take ( & mut self . state ) ;
1611
1649
let old_pre_class_inits = self . pre_class_inits . take ( ) ;
1612
1650
let old_extra_lets = self . extra_lets . take ( ) ;
1613
- let old_extra_stmts = self . extra_stmts . take ( ) ;
1614
1651
let old_extra_vars = self . extra_vars . take ( ) ;
1615
1652
1616
1653
let mut new = Vec :: with_capacity ( n. len ( ) ) ;
@@ -1650,9 +1687,9 @@ impl VisitMut for Decorator202203 {
1650
1687
* n = new;
1651
1688
1652
1689
self . extra_vars = old_extra_vars;
1653
- self . extra_stmts = old_extra_stmts;
1654
1690
self . extra_lets = old_extra_lets;
1655
1691
self . pre_class_inits = old_pre_class_inits;
1692
+ self . state = old_state;
1656
1693
}
1657
1694
}
1658
1695
1 commit comments
github-actions[bot] commentedon Jun 8, 2023
Benchmark
es/full/bugs-1
303955
ns/iter (± 2324
)307783
ns/iter (± 7577
)0.99
es/full/minify/libraries/antd
1467484525
ns/iter (± 12067225
)1490980646
ns/iter (± 17109322
)0.98
es/full/minify/libraries/d3
311934217
ns/iter (± 2279178
)315376713
ns/iter (± 5958092
)0.99
es/full/minify/libraries/echarts
1201620404
ns/iter (± 14714019
)1206994815
ns/iter (± 5037923
)1.00
es/full/minify/libraries/jquery
95044278
ns/iter (± 445442
)95047604
ns/iter (± 239309
)1.00
es/full/minify/libraries/lodash
112583075
ns/iter (± 282096
)113142735
ns/iter (± 1357721
)1.00
es/full/minify/libraries/moment
55796479
ns/iter (± 184538
)55839073
ns/iter (± 170007
)1.00
es/full/minify/libraries/react
19913663
ns/iter (± 186646
)19999043
ns/iter (± 37357
)1.00
es/full/minify/libraries/terser
250205455
ns/iter (± 2198087
)246446972
ns/iter (± 710794
)1.02
es/full/minify/libraries/three
452430818
ns/iter (± 3223615
)435833072
ns/iter (± 2456695
)1.04
es/full/minify/libraries/typescript
3009212200
ns/iter (± 35810181
)3003623373
ns/iter (± 9652755
)1.00
es/full/minify/libraries/victory
643910043
ns/iter (± 6962487
)647142461
ns/iter (± 5333664
)1.00
es/full/minify/libraries/vue
135634063
ns/iter (± 332995
)138230877
ns/iter (± 644517
)0.98
es/full/codegen/es3
35988
ns/iter (± 246
)36321
ns/iter (± 120
)0.99
es/full/codegen/es5
36126
ns/iter (± 133
)36282
ns/iter (± 36
)1.00
es/full/codegen/es2015
36088
ns/iter (± 81
)36283
ns/iter (± 65
)0.99
es/full/codegen/es2016
35999
ns/iter (± 74
)36245
ns/iter (± 64
)0.99
es/full/codegen/es2017
36109
ns/iter (± 52
)36309
ns/iter (± 43
)0.99
es/full/codegen/es2018
35933
ns/iter (± 152
)36232
ns/iter (± 84
)0.99
es/full/codegen/es2019
36182
ns/iter (± 113
)36323
ns/iter (± 85
)1.00
es/full/codegen/es2020
36112
ns/iter (± 81
)36286
ns/iter (± 53
)1.00
es/full/all/es3
180025541
ns/iter (± 926230
)179791533
ns/iter (± 719633
)1.00
es/full/all/es5
169749805
ns/iter (± 594731
)171539536
ns/iter (± 886500
)0.99
es/full/all/es2015
126510925
ns/iter (± 586634
)127066027
ns/iter (± 498451
)1.00
es/full/all/es2016
125599591
ns/iter (± 462772
)126586740
ns/iter (± 521394
)0.99
es/full/all/es2017
124701997
ns/iter (± 873902
)125489097
ns/iter (± 708529
)0.99
es/full/all/es2018
122601797
ns/iter (± 454033
)123958117
ns/iter (± 501698
)0.99
es/full/all/es2019
122285845
ns/iter (± 618755
)123461546
ns/iter (± 574127
)0.99
es/full/all/es2020
116097408
ns/iter (± 635344
)118184621
ns/iter (± 317167
)0.98
es/full/parser
514292
ns/iter (± 7108
)517191
ns/iter (± 3961
)0.99
es/full/base/fixer
19248
ns/iter (± 84
)18236
ns/iter (± 128
)1.06
es/full/base/resolver_and_hygiene
95327
ns/iter (± 193
)90877
ns/iter (± 276
)1.05
serialization of serde
313
ns/iter (± 2
)316
ns/iter (± 0
)0.99
css/minify/libraries/bootstrap
30858437
ns/iter (± 121565
)30915808
ns/iter (± 144697
)1.00
css/visitor/compare/clone
2149619
ns/iter (± 10468
)1906383
ns/iter (± 12333
)1.13
css/visitor/compare/visit_mut_span
2276221
ns/iter (± 16431
)2050453
ns/iter (± 6002
)1.11
css/visitor/compare/visit_mut_span_panic
2350754
ns/iter (± 24420
)2128272
ns/iter (± 7926
)1.10
css/visitor/compare/fold_span
2997188
ns/iter (± 18103
)2807297
ns/iter (± 12453
)1.07
css/visitor/compare/fold_span_panic
3181430
ns/iter (± 37217
)3016782
ns/iter (± 11302
)1.05
css/lexer/bootstrap_5_1_3
4808768
ns/iter (± 11285
)4814585
ns/iter (± 2310
)1.00
css/lexer/foundation_6_7_4
4042674
ns/iter (± 4628
)4051902
ns/iter (± 1979
)1.00
css/lexer/tailwind_3_1_1
765232
ns/iter (± 793
)764265
ns/iter (± 278
)1.00
css/parser/bootstrap_5_1_3
20577245
ns/iter (± 84713
)20586787
ns/iter (± 24884
)1.00
css/parser/foundation_6_7_4
16541775
ns/iter (± 40042
)16577051
ns/iter (± 69764
)1.00
css/parser/tailwind_3_1_1
3185031
ns/iter (± 3527
)3199868
ns/iter (± 2839
)1.00
es/codegen/colors
738784
ns/iter (± 400782
)740624
ns/iter (± 401173
)1.00
es/codegen/large
3110146
ns/iter (± 1641323
)3120128
ns/iter (± 1635030
)1.00
es/codegen/with-parser/colors
48859
ns/iter (± 331
)48887
ns/iter (± 243
)1.00
es/codegen/with-parser/large
504321
ns/iter (± 691
)521112
ns/iter (± 3305
)0.97
es/minify/libraries/antd
1302678354
ns/iter (± 14998550
)1323790696
ns/iter (± 13689427
)0.98
es/minify/libraries/d3
277902834
ns/iter (± 1178392
)281493184
ns/iter (± 1478748
)0.99
es/minify/libraries/echarts
1047513178
ns/iter (± 7555550
)1056905603
ns/iter (± 7906080
)0.99
es/minify/libraries/jquery
83333834
ns/iter (± 412914
)83551073
ns/iter (± 222946
)1.00
es/minify/libraries/lodash
101865817
ns/iter (± 275935
)102003795
ns/iter (± 212712
)1.00
es/minify/libraries/moment
49219606
ns/iter (± 97923
)49159782
ns/iter (± 97254
)1.00
es/minify/libraries/react
17943495
ns/iter (± 49027
)17846904
ns/iter (± 49528
)1.01
es/minify/libraries/terser
211292198
ns/iter (± 1033950
)213567474
ns/iter (± 840212
)0.99
es/minify/libraries/three
367812815
ns/iter (± 4047044
)372482774
ns/iter (± 1924747
)0.99
es/minify/libraries/typescript
2574660922
ns/iter (± 13227312
)2613162969
ns/iter (± 10441432
)0.99
es/minify/libraries/victory
570946996
ns/iter (± 14268620
)551217447
ns/iter (± 4675303
)1.04
es/minify/libraries/vue
122616641
ns/iter (± 451207
)123457896
ns/iter (± 738900
)0.99
es/visitor/compare/clone
2067940
ns/iter (± 16496
)2079708
ns/iter (± 9511
)0.99
es/visitor/compare/visit_mut_span
2407046
ns/iter (± 6919
)2409416
ns/iter (± 3513
)1.00
es/visitor/compare/visit_mut_span_panic
2444920
ns/iter (± 12299
)2449959
ns/iter (± 2954
)1.00
es/visitor/compare/fold_span
3486198
ns/iter (± 5068
)3488994
ns/iter (± 6413
)1.00
es/visitor/compare/fold_span_panic
3614200
ns/iter (± 5515
)3616746
ns/iter (± 13140
)1.00
es/lexer/colors
13521
ns/iter (± 44
)13087
ns/iter (± 59
)1.03
es/lexer/angular
6253368
ns/iter (± 21015
)6253308
ns/iter (± 10990
)1.00
es/lexer/backbone
835776
ns/iter (± 3141
)818490
ns/iter (± 1710
)1.02
es/lexer/jquery
4650228
ns/iter (± 6084
)4619606
ns/iter (± 3578
)1.01
es/lexer/jquery mobile
7129219
ns/iter (± 13568
)7082083
ns/iter (± 4298
)1.01
es/lexer/mootools
3687183
ns/iter (± 7511
)3654247
ns/iter (± 4146
)1.01
es/lexer/underscore
693761
ns/iter (± 576
)693703
ns/iter (± 859
)1.00
es/lexer/three
21959742
ns/iter (± 31284
)21803955
ns/iter (± 34962
)1.01
es/lexer/yui
4141302
ns/iter (± 3176
)4054871
ns/iter (± 1919
)1.02
es/parser/colors
29295
ns/iter (± 76
)29370
ns/iter (± 93
)1.00
es/parser/angular
14734350
ns/iter (± 97307
)14459825
ns/iter (± 592043
)1.02
es/parser/backbone
2179528
ns/iter (± 7750
)2138656
ns/iter (± 11336
)1.02
es/parser/jquery
11891230
ns/iter (± 58421
)11691667
ns/iter (± 35685
)1.02
es/parser/jquery mobile
18009218
ns/iter (± 108989
)17854597
ns/iter (± 46470
)1.01
es/parser/mootools
9084464
ns/iter (± 30963
)8932900
ns/iter (± 15419
)1.02
es/parser/underscore
1884593
ns/iter (± 9354
)1866976
ns/iter (± 8857
)1.01
es/parser/three
50626049
ns/iter (± 313655
)49498644
ns/iter (± 205186
)1.02
es/parser/yui
9098435
ns/iter (± 26081
)8972468
ns/iter (± 29532
)1.01
es/preset-env/usage/builtin_type
146647
ns/iter (± 32394
)145339
ns/iter (± 31175
)1.01
es/preset-env/usage/property
20782
ns/iter (± 60
)20271
ns/iter (± 54
)1.03
es/resolver/typescript
95208458
ns/iter (± 1831160
)92968979
ns/iter (± 1396577
)1.02
es/fixer/typescript
66892246
ns/iter (± 1387934
)65904892
ns/iter (± 532711
)1.01
es/hygiene/typescript
143957777
ns/iter (± 576859
)141676734
ns/iter (± 1028313
)1.02
es/resolver_with_hygiene/typescript
307328859
ns/iter (± 2110042
)304889704
ns/iter (± 1768070
)1.01
es/visitor/base-perf/module_clone
62379
ns/iter (± 299
)62496
ns/iter (± 256
)1.00
es/visitor/base-perf/fold_empty
65515
ns/iter (± 350
)65583
ns/iter (± 360
)1.00
es/visitor/base-perf/fold_noop_impl_all
65634
ns/iter (± 242
)66216
ns/iter (± 201
)0.99
es/visitor/base-perf/fold_noop_impl_vec
66487
ns/iter (± 345
)66150
ns/iter (± 253
)1.01
es/visitor/base-perf/boxing_boxed_clone
57
ns/iter (± 0
)61
ns/iter (± 0
)0.93
es/visitor/base-perf/boxing_unboxed_clone
41
ns/iter (± 0
)41
ns/iter (± 0
)1
es/visitor/base-perf/boxing_boxed
113
ns/iter (± 0
)119
ns/iter (± 0
)0.95
es/visitor/base-perf/boxing_unboxed
79
ns/iter (± 0
)81
ns/iter (± 0
)0.98
es/visitor/base-perf/visit_empty
0
ns/iter (± 0
)0
ns/iter (± 0
)NaN
es/visitor/base-perf/visit_contains_this
2678
ns/iter (± 12
)2680
ns/iter (± 16
)1.00
es/base/parallel/resolver/typescript
4716615597
ns/iter (± 244861078
)4640573954
ns/iter (± 287384549
)1.02
es/base/parallel/hygiene/typescript
1550703889
ns/iter (± 21564894
)1570066256
ns/iter (± 30585886
)0.99
misc/visitors/time-complexity/time 5
104
ns/iter (± 0
)104
ns/iter (± 0
)1
misc/visitors/time-complexity/time 10
267
ns/iter (± 0
)267
ns/iter (± 0
)1
misc/visitors/time-complexity/time 15
503
ns/iter (± 5
)504
ns/iter (± 39
)1.00
misc/visitors/time-complexity/time 20
879
ns/iter (± 55
)1060
ns/iter (± 2
)0.83
misc/visitors/time-complexity/time 40
3541
ns/iter (± 13
)3551
ns/iter (± 204
)1.00
misc/visitors/time-complexity/time 60
7338
ns/iter (± 20
)7538
ns/iter (± 36
)0.97
es/full-target/es2016
241941
ns/iter (± 696
)240264
ns/iter (± 761
)1.01
es/full-target/es2017
227845
ns/iter (± 594
)226490
ns/iter (± 479
)1.01
es/full-target/es2018
216982
ns/iter (± 601
)215160
ns/iter (± 612
)1.01
es2020_nullish_coalescing
73808
ns/iter (± 465
)73550
ns/iter (± 314
)1.00
es2020_optional_chaining
103209
ns/iter (± 410
)103634
ns/iter (± 748
)1.00
es2022_class_properties
122012
ns/iter (± 338
)121562
ns/iter (± 564
)1.00
es2018_object_rest_spread
77169
ns/iter (± 176
)77083
ns/iter (± 326
)1.00
es2019_optional_catch_binding
65559
ns/iter (± 201
)65485
ns/iter (± 137
)1.00
es2017_async_to_generator
66097
ns/iter (± 163
)66259
ns/iter (± 153
)1.00
es2016_exponentiation
71429
ns/iter (± 166
)71392
ns/iter (± 257
)1.00
es2015_arrow
74228
ns/iter (± 381
)73853
ns/iter (± 307
)1.01
es2015_block_scoped_fn
70354
ns/iter (± 208
)70233
ns/iter (± 341
)1.00
es2015_block_scoping
134022
ns/iter (± 387
)134162
ns/iter (± 661
)1.00
This comment was automatically generated by workflow using github-action-benchmark.