-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(es/parser): Optimize macros (#9100)
**Description:** I could optimize macros used enormous amount of times.
- Loading branch information
Showing
19 changed files
with
156 additions
and
97 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
Oops, something went wrong.
719b7c5
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
276778
ns/iter (± 3156
)278677
ns/iter (± 13590
)0.99
es/full/minify/libraries/antd
1829937761
ns/iter (± 88266673
)1820184794
ns/iter (± 101589570
)1.01
es/full/minify/libraries/d3
346209924
ns/iter (± 2744131
)341174245
ns/iter (± 4180993
)1.01
es/full/minify/libraries/echarts
1526345978
ns/iter (± 9298204
)1491089227
ns/iter (± 51276298
)1.02
es/full/minify/libraries/jquery
102583904
ns/iter (± 1441251
)102531130
ns/iter (± 251151
)1.00
es/full/minify/libraries/lodash
112997410
ns/iter (± 309944
)113094380
ns/iter (± 724134
)1.00
es/full/minify/libraries/moment
59403149
ns/iter (± 151718
)59688003
ns/iter (± 152755
)1.00
es/full/minify/libraries/react
18227562
ns/iter (± 35657
)18324318
ns/iter (± 16893
)0.99
es/full/minify/libraries/terser
282564913
ns/iter (± 3735645
)274302227
ns/iter (± 1067183
)1.03
es/full/minify/libraries/three
476196955
ns/iter (± 16865498
)468823073
ns/iter (± 3561188
)1.02
es/full/minify/libraries/typescript
3260671315
ns/iter (± 35004652
)3231052554
ns/iter (± 39287864
)1.01
es/full/minify/libraries/victory
772710460
ns/iter (± 21178365
)725832463
ns/iter (± 7605929
)1.06
es/full/minify/libraries/vue
145760166
ns/iter (± 753008
)145543264
ns/iter (± 892376
)1.00
es/full/codegen/es3
60698
ns/iter (± 604
)60499
ns/iter (± 748
)1.00
es/full/codegen/es5
60505
ns/iter (± 334
)60289
ns/iter (± 199
)1.00
es/full/codegen/es2015
61214
ns/iter (± 520
)60034
ns/iter (± 244
)1.02
es/full/codegen/es2016
60309
ns/iter (± 456
)60068
ns/iter (± 171
)1.00
es/full/codegen/es2017
60472
ns/iter (± 579
)60094
ns/iter (± 200
)1.01
es/full/codegen/es2018
60912
ns/iter (± 426
)59974
ns/iter (± 724
)1.02
es/full/codegen/es2019
60834
ns/iter (± 545
)60046
ns/iter (± 246
)1.01
es/full/codegen/es2020
60607
ns/iter (± 362
)60391
ns/iter (± 559
)1.00
es/full/all/es3
159976950
ns/iter (± 799758
)159506952
ns/iter (± 1362440
)1.00
es/full/all/es5
154527716
ns/iter (± 519523
)153217511
ns/iter (± 1075266
)1.01
es/full/all/es2015
112524727
ns/iter (± 766673
)113621532
ns/iter (± 465503
)0.99
es/full/all/es2016
112530449
ns/iter (± 850809
)113283861
ns/iter (± 1121094
)0.99
es/full/all/es2017
111732846
ns/iter (± 861125
)111982898
ns/iter (± 802830
)1.00
es/full/all/es2018
109431538
ns/iter (± 1423490
)110568198
ns/iter (± 1278361
)0.99
es/full/all/es2019
109011625
ns/iter (± 543836
)109491676
ns/iter (± 705503
)1.00
es/full/all/es2020
104981616
ns/iter (± 770644
)105309878
ns/iter (± 594037
)1.00
es/full/parser
449897
ns/iter (± 2184
)434629
ns/iter (± 2051
)1.04
es/full/base/fixer
16660
ns/iter (± 121
)15477
ns/iter (± 88
)1.08
es/full/base/resolver_and_hygiene
81075
ns/iter (± 192
)80850
ns/iter (± 226
)1.00
serialization of serde
274
ns/iter (± 1
)270
ns/iter (± 3
)1.01
css/minify/libraries/bootstrap
22807227
ns/iter (± 129879
)22714148
ns/iter (± 333469
)1.00
css/visitor/compare/clone
1371023
ns/iter (± 10457
)1390265
ns/iter (± 13588
)0.99
css/visitor/compare/visit_mut_span
1479899
ns/iter (± 19379
)1499558
ns/iter (± 13116
)0.99
css/visitor/compare/visit_mut_span_panic
1496268
ns/iter (± 43533
)1503150
ns/iter (± 29656
)1.00
css/visitor/compare/fold_span
1976961
ns/iter (± 16507
)2008399
ns/iter (± 4296
)0.98
css/visitor/compare/fold_span_panic
2077556
ns/iter (± 30208
)2151870
ns/iter (± 10233
)0.97
css/lexer/bootstrap_5_1_3
3423437
ns/iter (± 66351
)3452695
ns/iter (± 3171
)0.99
css/lexer/foundation_6_7_4
2783568
ns/iter (± 43110
)2806728
ns/iter (± 1690
)0.99
css/lexer/tailwind_3_1_1
517489
ns/iter (± 7367
)539871
ns/iter (± 526
)0.96
css/parser/bootstrap_5_1_3
15452744
ns/iter (± 373785
)15889291
ns/iter (± 25939
)0.97
css/parser/foundation_6_7_4
12713134
ns/iter (± 58324
)12755541
ns/iter (± 22364
)1.00
css/parser/tailwind_3_1_1
2481983
ns/iter (± 26468
)2503287
ns/iter (± 2436
)0.99
es/codegen/colors
729202
ns/iter (± 390069
)724910
ns/iter (± 395452
)1.01
es/codegen/large
3166827
ns/iter (± 1698353
)3008258
ns/iter (± 1575014
)1.05
es/codegen/with-parser/colors
38179
ns/iter (± 856
)41292
ns/iter (± 481
)0.92
es/codegen/with-parser/large
422584
ns/iter (± 13473
)456468
ns/iter (± 7632
)0.93
es/minify/libraries/antd
1421313307
ns/iter (± 21378219
)1417463953
ns/iter (± 18521530
)1.00
es/minify/libraries/d3
284111545
ns/iter (± 2589655
)279656781
ns/iter (± 3556801
)1.02
es/minify/libraries/echarts
1163275967
ns/iter (± 11067040
)1155178171
ns/iter (± 14053928
)1.01
es/minify/libraries/jquery
83288958
ns/iter (± 601701
)81986005
ns/iter (± 586493
)1.02
es/minify/libraries/lodash
104523179
ns/iter (± 980788
)104052089
ns/iter (± 572945
)1.00
es/minify/libraries/moment
48639778
ns/iter (± 207777
)48088952
ns/iter (± 140788
)1.01
es/minify/libraries/react
16281574
ns/iter (± 29179
)16251610
ns/iter (± 34046
)1.00
es/minify/libraries/terser
220366644
ns/iter (± 2403946
)219285187
ns/iter (± 1020236
)1.00
es/minify/libraries/three
369481856
ns/iter (± 4612933
)364693951
ns/iter (± 6140104
)1.01
es/minify/libraries/typescript
2760976268
ns/iter (± 26896063
)2719288092
ns/iter (± 21004237
)1.02
es/minify/libraries/victory
575727172
ns/iter (± 6448690
)564903250
ns/iter (± 7272229
)1.02
es/minify/libraries/vue
122072071
ns/iter (± 192301
)120948594
ns/iter (± 560143
)1.01
es/visitor/compare/clone
1752347
ns/iter (± 5567
)1750259
ns/iter (± 28917
)1.00
es/visitor/compare/visit_mut_span
2108286
ns/iter (± 20893
)2115387
ns/iter (± 13565
)1.00
es/visitor/compare/visit_mut_span_panic
2115495
ns/iter (± 35122
)2073535
ns/iter (± 49256
)1.02
es/visitor/compare/fold_span
2832010
ns/iter (± 37311
)2790460
ns/iter (± 7141
)1.01
es/visitor/compare/fold_span_panic
2872488
ns/iter (± 18483
)2853219
ns/iter (± 28885
)1.01
es/lexer/colors
8413
ns/iter (± 72
)8373
ns/iter (± 14
)1.00
es/lexer/angular
4108844
ns/iter (± 5321
)4158709
ns/iter (± 12180
)0.99
es/lexer/backbone
630832
ns/iter (± 1656
)616266
ns/iter (± 2836
)1.02
es/lexer/jquery
3540802
ns/iter (± 12556
)3455426
ns/iter (± 6645
)1.02
es/lexer/jquery mobile
5177567
ns/iter (± 9185
)5309512
ns/iter (± 24826
)0.98
es/lexer/mootools
2833891
ns/iter (± 4487
)2782634
ns/iter (± 7003
)1.02
es/lexer/underscore
529177
ns/iter (± 3941
)520133
ns/iter (± 4675
)1.02
es/lexer/three
15817901
ns/iter (± 50895
)15779409
ns/iter (± 35796
)1.00
es/lexer/yui
2697079
ns/iter (± 1610
)2705292
ns/iter (± 11803
)1.00
es/lexer/cal-com
12937387
ns/iter (± 87995
)12820957
ns/iter (± 20429
)1.01
es/lexer/typescript
95414903
ns/iter (± 333620
)90549878
ns/iter (± 906145
)1.05
es/parser/colors
23095
ns/iter (± 89
)23787
ns/iter (± 93
)0.97
es/parser/angular
12094716
ns/iter (± 101785
)12072369
ns/iter (± 171964
)1.00
es/parser/backbone
1827453
ns/iter (± 7817
)1852487
ns/iter (± 8040
)0.99
es/parser/jquery
10242795
ns/iter (± 193802
)10207941
ns/iter (± 85642
)1.00
es/parser/jquery mobile
16475802
ns/iter (± 351435
)15472637
ns/iter (± 154475
)1.06
es/parser/mootools
7905236
ns/iter (± 94545
)7932710
ns/iter (± 47477
)1.00
es/parser/underscore
1587779
ns/iter (± 14189
)1615191
ns/iter (± 7755
)0.98
es/parser/three
46389143
ns/iter (± 305047
)45493586
ns/iter (± 1014616
)1.02
es/parser/yui
7331541
ns/iter (± 167678
)7359760
ns/iter (± 65717
)1.00
es/parser/cal-com
43826453
ns/iter (± 289193
)44795115
ns/iter (± 1334279
)0.98
es/parser/typescript
278385819
ns/iter (± 3735965
)282977767
ns/iter (± 3487291
)0.98
es/preset-env/usage/builtin_type
136183
ns/iter (± 33403
)135210
ns/iter (± 34165
)1.01
es/preset-env/usage/property
16055
ns/iter (± 373
)16579
ns/iter (± 64
)0.97
es/resolver/typescript
98642521
ns/iter (± 1943868
)103233328
ns/iter (± 2194552
)0.96
es/fixer/typescript
80892340
ns/iter (± 2774386
)85185104
ns/iter (± 1916305
)0.95
es/hygiene/typescript
177102584
ns/iter (± 4566930
)183731218
ns/iter (± 3436743
)0.96
es/resolver_with_hygiene/typescript
298117431
ns/iter (± 3172243
)317718778
ns/iter (± 2474040
)0.94
es/visitor/base-perf/module_clone
57324
ns/iter (± 1711
)55409
ns/iter (± 404
)1.03
es/visitor/base-perf/fold_empty
60070
ns/iter (± 459
)59705
ns/iter (± 792
)1.01
es/visitor/base-perf/fold_noop_impl_all
59889
ns/iter (± 885
)59144
ns/iter (± 415
)1.01
es/visitor/base-perf/fold_noop_impl_vec
60574
ns/iter (± 249
)59048
ns/iter (± 431
)1.03
es/visitor/base-perf/boxing_boxed_clone
61
ns/iter (± 0
)60
ns/iter (± 0
)1.02
es/visitor/base-perf/boxing_unboxed_clone
47
ns/iter (± 0
)47
ns/iter (± 0
)1
es/visitor/base-perf/boxing_boxed
107
ns/iter (± 0
)115
ns/iter (± 0
)0.93
es/visitor/base-perf/boxing_unboxed
82
ns/iter (± 0
)91
ns/iter (± 1
)0.90
es/visitor/base-perf/visit_contains_this
2543
ns/iter (± 17
)2575
ns/iter (± 14
)0.99
es/base/parallel/resolver/typescript
2557212229
ns/iter (± 96086801
)2326683336
ns/iter (± 175689592
)1.10
es/base/parallel/hygiene/typescript
3236709812
ns/iter (± 44264728
)3351422847
ns/iter (± 36812784
)0.97
babelify-only
487918
ns/iter (± 6270
)501984
ns/iter (± 5591
)0.97
parse_and_babelify_angular
43102047
ns/iter (± 926095
)37933848
ns/iter (± 2268682
)1.14
parse_and_babelify_backbone
4352366
ns/iter (± 181996
)4332144
ns/iter (± 123080
)1.00
parse_and_babelify_jquery
28877310
ns/iter (± 338449
)29308196
ns/iter (± 263922
)0.99
parse_and_babelify_jquery_mobile
51108422
ns/iter (± 1344672
)50763698
ns/iter (± 628124
)1.01
parse_and_babelify_mootools
26602204
ns/iter (± 514760
)26215683
ns/iter (± 842818
)1.01
parse_and_babelify_underscore
3649825
ns/iter (± 15537
)3673797
ns/iter (± 15777
)0.99
parse_and_babelify_yui
24034016
ns/iter (± 320185
)27885390
ns/iter (± 1566041
)0.86
html/minify/document/css_spec
46372489
ns/iter (± 181888
)44785507
ns/iter (± 207495
)1.04
html/minify/document/github
18479955
ns/iter (± 130805
)17917511
ns/iter (± 142704
)1.03
html/minify/document/stackoverflow
17050927
ns/iter (± 415726
)16394904
ns/iter (± 37588
)1.04
html/minify/document_fragment/css_spec
45386400
ns/iter (± 145784
)44055978
ns/iter (± 88044
)1.03
html/minify/document_fragment/github
18140891
ns/iter (± 160601
)17728181
ns/iter (± 23240
)1.02
html/minify/document_fragment/stackoverflow
16771088
ns/iter (± 313322
)16329543
ns/iter (± 16385
)1.03
html/document/visitor/compare/clone
166628
ns/iter (± 798
)166986
ns/iter (± 2188
)1.00
html/document/visitor/compare/visit_mut_span
184642
ns/iter (± 1167
)182236
ns/iter (± 4364
)1.01
html/document/visitor/compare/visit_mut_span_panic
188822
ns/iter (± 1009
)188345
ns/iter (± 9874
)1.00
html/document/visitor/compare/fold_span
228804
ns/iter (± 757
)227742
ns/iter (± 1736
)1.00
html/document/visitor/compare/fold_span_panic
281851
ns/iter (± 1174
)280231
ns/iter (± 806
)1.01
html/document_fragment/visitor/compare/clone
168128
ns/iter (± 1008
)165654
ns/iter (± 1238
)1.01
html/document_fragment/visitor/compare/visit_mut_span
185039
ns/iter (± 2085
)182012
ns/iter (± 453
)1.02
html/document_fragment/visitor/compare/visit_mut_span_panic
186623
ns/iter (± 1539
)189414
ns/iter (± 1394
)0.99
html/document_fragment/visitor/compare/fold_span
235281
ns/iter (± 884
)228495
ns/iter (± 2444
)1.03
html/document_fragment/visitor/compare/fold_span_panic
285938
ns/iter (± 1337
)280148
ns/iter (± 1414
)1.02
html/lexer/css_2021_spec
13088272
ns/iter (± 38406
)13089179
ns/iter (± 14114
)1.00
html/lexer/github_com_17_05_2022
5007225
ns/iter (± 14719
)5020861
ns/iter (± 7344
)1.00
html/lexer/stackoverflow_com_17_05_2022
4757381
ns/iter (± 6402
)4770467
ns/iter (± 24385
)1.00
html/parser/parser_document/css_2021_spec
25808521
ns/iter (± 291733
)25834424
ns/iter (± 137858
)1.00
html/parser/parser_document/github_com_17_05_2022
8593266
ns/iter (± 11346
)8593591
ns/iter (± 80881
)1.00
html/parser/parser_document/stackoverflow_com_17_05_2022
7503050
ns/iter (± 10099
)7541105
ns/iter (± 40222
)0.99
html/parser/parser_document_fragment/css_2021_spec
25615765
ns/iter (± 45698
)25535233
ns/iter (± 74406
)1.00
html/parser/parser_document_fragment/github_com_17_05_2022
8545040
ns/iter (± 6452
)8558217
ns/iter (± 10035
)1.00
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7526367
ns/iter (± 17877
)7547656
ns/iter (± 68019
)1.00
This comment was automatically generated by workflow using github-action-benchmark.