-
-
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/compat): Do not reuse span (#9117)
**Related issue:** - Closes #9108
- Loading branch information
Showing
4 changed files
with
49 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"module": { | ||
"type": "es6", | ||
"strictMode": true, | ||
"noInterop": false | ||
}, | ||
"jsc": { | ||
"externalHelpers": false, | ||
"target": "es2017", | ||
"parser": { | ||
"syntax": "typescript", | ||
"tsx": true, | ||
"decorators": true, | ||
"dynamicImport": true | ||
}, | ||
"transform": { | ||
"legacyDecorator": true, | ||
"decoratorMetadata": false, | ||
"react": { | ||
"throwIfNamespace": false, | ||
"useBuiltins": false, | ||
"pragma": "React.createElement", | ||
"pragmaFrag": "React.Fragment", | ||
"importSource": "react", | ||
"runtime": "automatic" | ||
} | ||
}, | ||
"keepClassNames": true, | ||
"paths": {}, | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const createFragment = (key: { name: string }): JSX.Element => ( | ||
<>Key Name: {key.name ?? "None"}</> | ||
); |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { jsxs: _jsxs, Fragment: _Fragment } = require("react/jsx-runtime"); | ||
const createFragment = (key)=>{ | ||
var _key_name; | ||
return /*#__PURE__*/ _jsxs(_Fragment, { | ||
children: [ | ||
"Key Name: ", | ||
(_key_name = key.name) !== null && _key_name !== void 0 ? _key_name : "None" | ||
] | ||
}); | ||
}; |
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
6520052
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
293089
ns/iter (± 13696
)270442
ns/iter (± 13154
)1.08
es/full/minify/libraries/antd
1948681642
ns/iter (± 87563437
)1716887723
ns/iter (± 43867530
)1.14
es/full/minify/libraries/d3
379758700
ns/iter (± 9011528
)342924588
ns/iter (± 2561096
)1.11
es/full/minify/libraries/echarts
1641027505
ns/iter (± 35608658
)1434099561
ns/iter (± 17698202
)1.14
es/full/minify/libraries/jquery
103453256
ns/iter (± 895245
)102976141
ns/iter (± 300267
)1.00
es/full/minify/libraries/lodash
114589318
ns/iter (± 2084122
)113755629
ns/iter (± 169433
)1.01
es/full/minify/libraries/moment
59893059
ns/iter (± 692980
)59938850
ns/iter (± 86060
)1.00
es/full/minify/libraries/react
18399612
ns/iter (± 56523
)18446416
ns/iter (± 81707
)1.00
es/full/minify/libraries/terser
284661753
ns/iter (± 10077965
)274340822
ns/iter (± 967863
)1.04
es/full/minify/libraries/three
474768848
ns/iter (± 20510876
)463370751
ns/iter (± 2421115
)1.02
es/full/minify/libraries/typescript
3243307312
ns/iter (± 61530533
)3183782063
ns/iter (± 30010833
)1.02
es/full/minify/libraries/victory
767389068
ns/iter (± 43436322
)714011468
ns/iter (± 11734855
)1.07
es/full/minify/libraries/vue
145684121
ns/iter (± 1303763
)145206836
ns/iter (± 334022
)1.00
es/full/codegen/es3
59136
ns/iter (± 213
)58239
ns/iter (± 164
)1.02
es/full/codegen/es5
59035
ns/iter (± 345
)58569
ns/iter (± 179
)1.01
es/full/codegen/es2015
58791
ns/iter (± 169
)58746
ns/iter (± 113
)1.00
es/full/codegen/es2016
59394
ns/iter (± 333
)58314
ns/iter (± 157
)1.02
es/full/codegen/es2017
59148
ns/iter (± 4720
)58973
ns/iter (± 260
)1.00
es/full/codegen/es2018
58920
ns/iter (± 71
)58489
ns/iter (± 155
)1.01
es/full/codegen/es2019
59042
ns/iter (± 285
)58616
ns/iter (± 151
)1.01
es/full/codegen/es2020
59081
ns/iter (± 125
)58833
ns/iter (± 315
)1.00
es/full/all/es3
158795242
ns/iter (± 984412
)157758779
ns/iter (± 985014
)1.01
es/full/all/es5
152816626
ns/iter (± 749585
)153731483
ns/iter (± 720953
)0.99
es/full/all/es2015
113676584
ns/iter (± 904080
)112627500
ns/iter (± 1116244
)1.01
es/full/all/es2016
112757378
ns/iter (± 1274678
)112450022
ns/iter (± 766282
)1.00
es/full/all/es2017
111803621
ns/iter (± 908041
)111204957
ns/iter (± 599960
)1.01
es/full/all/es2018
110211048
ns/iter (± 662503
)109965725
ns/iter (± 1918626
)1.00
es/full/all/es2019
110078287
ns/iter (± 818459
)109086433
ns/iter (± 818932
)1.01
es/full/all/es2020
105927813
ns/iter (± 599635
)104292022
ns/iter (± 773632
)1.02
es/full/parser
444188
ns/iter (± 2633
)444015
ns/iter (± 3121
)1.00
es/full/base/fixer
15958
ns/iter (± 108
)16294
ns/iter (± 105
)0.98
es/full/base/resolver_and_hygiene
81486
ns/iter (± 249
)81131
ns/iter (± 238
)1.00
serialization of serde
276
ns/iter (± 3
)279
ns/iter (± 1
)0.99
css/minify/libraries/bootstrap
22196499
ns/iter (± 177067
)21475231
ns/iter (± 797266
)1.03
css/visitor/compare/clone
1402731
ns/iter (± 7828
)1375342
ns/iter (± 5885
)1.02
css/visitor/compare/visit_mut_span
1532766
ns/iter (± 13833
)1502363
ns/iter (± 5971
)1.02
css/visitor/compare/visit_mut_span_panic
1533517
ns/iter (± 33515
)1504003
ns/iter (± 15885
)1.02
css/visitor/compare/fold_span
2046352
ns/iter (± 14582
)2006474
ns/iter (± 4547
)1.02
css/visitor/compare/fold_span_panic
2165768
ns/iter (± 8087
)2163356
ns/iter (± 7602
)1.00
css/lexer/bootstrap_5_1_3
3407396
ns/iter (± 1906
)3431631
ns/iter (± 8866
)0.99
css/lexer/foundation_6_7_4
2792600
ns/iter (± 13973
)2782641
ns/iter (± 3788
)1.00
css/lexer/tailwind_3_1_1
536448
ns/iter (± 4589
)535193
ns/iter (± 1735
)1.00
css/parser/bootstrap_5_1_3
16021858
ns/iter (± 108823
)15990038
ns/iter (± 15370
)1.00
css/parser/foundation_6_7_4
12832229
ns/iter (± 23805
)12862349
ns/iter (± 22146
)1.00
css/parser/tailwind_3_1_1
2524844
ns/iter (± 2842
)2545342
ns/iter (± 4087
)0.99
es/codegen/colors
727710
ns/iter (± 402266
)727853
ns/iter (± 395496
)1.00
es/codegen/large
2989574
ns/iter (± 1614311
)2946798
ns/iter (± 1583387
)1.01
es/codegen/with-parser/colors
39096
ns/iter (± 283
)40548
ns/iter (± 181
)0.96
es/codegen/with-parser/large
449554
ns/iter (± 1725
)453298
ns/iter (± 1033
)0.99
es/minify/libraries/antd
1351530456
ns/iter (± 24520721
)1393869602
ns/iter (± 23373623
)0.97
es/minify/libraries/d3
274859638
ns/iter (± 9149185
)279815136
ns/iter (± 7163527
)0.98
es/minify/libraries/echarts
1106987029
ns/iter (± 18161980
)1127560915
ns/iter (± 7336894
)0.98
es/minify/libraries/jquery
80687874
ns/iter (± 666948
)81870742
ns/iter (± 166809
)0.99
es/minify/libraries/lodash
101304503
ns/iter (± 747495
)103008807
ns/iter (± 142004
)0.98
es/minify/libraries/moment
47057573
ns/iter (± 542980
)47837555
ns/iter (± 72144
)0.98
es/minify/libraries/react
15893525
ns/iter (± 191226
)16077200
ns/iter (± 133182
)0.99
es/minify/libraries/terser
208403587
ns/iter (± 2219750
)215145000
ns/iter (± 353522
)0.97
es/minify/libraries/three
347050480
ns/iter (± 4093390
)357261892
ns/iter (± 1112865
)0.97
es/minify/libraries/typescript
2594117980
ns/iter (± 14822858
)2684733007
ns/iter (± 23394229
)0.97
es/minify/libraries/victory
545065267
ns/iter (± 6558200
)560446346
ns/iter (± 12669310
)0.97
es/minify/libraries/vue
117523729
ns/iter (± 1711719
)120124270
ns/iter (± 1069947
)0.98
es/visitor/compare/clone
1745882
ns/iter (± 9611
)1743637
ns/iter (± 7798
)1.00
es/visitor/compare/visit_mut_span
2091803
ns/iter (± 5902
)2088335
ns/iter (± 14586
)1.00
es/visitor/compare/visit_mut_span_panic
2084364
ns/iter (± 23752
)2092295
ns/iter (± 24364
)1.00
es/visitor/compare/fold_span
2819818
ns/iter (± 3516
)2831404
ns/iter (± 37914
)1.00
es/visitor/compare/fold_span_panic
2855652
ns/iter (± 8139
)2909695
ns/iter (± 42561
)0.98
es/lexer/colors
8875
ns/iter (± 286
)8713
ns/iter (± 45
)1.02
es/lexer/angular
4377633
ns/iter (± 26485
)4343006
ns/iter (± 33939
)1.01
es/lexer/backbone
641996
ns/iter (± 1530
)635918
ns/iter (± 911
)1.01
es/lexer/jquery
3583127
ns/iter (± 3609
)3695685
ns/iter (± 21085
)0.97
es/lexer/jquery mobile
5299816
ns/iter (± 17297
)5389079
ns/iter (± 10031
)0.98
es/lexer/mootools
2868825
ns/iter (± 1657
)2891683
ns/iter (± 11736
)0.99
es/lexer/underscore
538102
ns/iter (± 2183
)544019
ns/iter (± 350
)0.99
es/lexer/three
16391855
ns/iter (± 64455
)16272988
ns/iter (± 79837
)1.01
es/lexer/yui
2801105
ns/iter (± 9301
)2814652
ns/iter (± 11868
)1.00
es/lexer/cal-com
13043906
ns/iter (± 13051
)13457136
ns/iter (± 92624
)0.97
es/lexer/typescript
92722712
ns/iter (± 109639
)96840588
ns/iter (± 349129
)0.96
es/parser/colors
22818
ns/iter (± 89
)23128
ns/iter (± 91
)0.99
es/parser/angular
11746497
ns/iter (± 83322
)12144626
ns/iter (± 79984
)0.97
es/parser/backbone
1824173
ns/iter (± 6430
)1849225
ns/iter (± 9432
)0.99
es/parser/jquery
10017101
ns/iter (± 67992
)10307739
ns/iter (± 87761
)0.97
es/parser/jquery mobile
15136243
ns/iter (± 180466
)15945679
ns/iter (± 274985
)0.95
es/parser/mootools
7804437
ns/iter (± 23122
)7943225
ns/iter (± 40558
)0.98
es/parser/underscore
1588202
ns/iter (± 5768
)1615888
ns/iter (± 4877
)0.98
es/parser/three
43777876
ns/iter (± 398516
)47338168
ns/iter (± 318554
)0.92
es/parser/yui
7262230
ns/iter (± 41840
)7369330
ns/iter (± 58166
)0.99
es/parser/cal-com
39233046
ns/iter (± 261605
)43288711
ns/iter (± 339095
)0.91
es/parser/typescript
271407906
ns/iter (± 687417
)278582252
ns/iter (± 867181
)0.97
es/preset-env/usage/builtin_type
135126
ns/iter (± 34049
)136670
ns/iter (± 33874
)0.99
es/preset-env/usage/property
16466
ns/iter (± 94
)15524
ns/iter (± 145
)1.06
es/resolver/typescript
104335733
ns/iter (± 2280044
)99579415
ns/iter (± 2052676
)1.05
es/fixer/typescript
84027587
ns/iter (± 3752287
)80753978
ns/iter (± 3386976
)1.04
es/hygiene/typescript
191803429
ns/iter (± 4668947
)178433330
ns/iter (± 3644674
)1.07
es/resolver_with_hygiene/typescript
329467544
ns/iter (± 5357214
)301659317
ns/iter (± 3417388
)1.09
es/visitor/base-perf/module_clone
56563
ns/iter (± 802
)55853
ns/iter (± 1031
)1.01
es/visitor/base-perf/fold_empty
59723
ns/iter (± 1231
)59517
ns/iter (± 749
)1.00
es/visitor/base-perf/fold_noop_impl_all
59112
ns/iter (± 433
)59310
ns/iter (± 912
)1.00
es/visitor/base-perf/fold_noop_impl_vec
59286
ns/iter (± 403
)58986
ns/iter (± 980
)1.01
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
)49
ns/iter (± 0
)0.96
es/visitor/base-perf/boxing_boxed
106
ns/iter (± 0
)106
ns/iter (± 0
)1
es/visitor/base-perf/boxing_unboxed
81
ns/iter (± 0
)83
ns/iter (± 0
)0.98
es/visitor/base-perf/visit_contains_this
2621
ns/iter (± 5
)2620
ns/iter (± 4
)1.00
es/base/parallel/resolver/typescript
2434946119
ns/iter (± 139167811
)2435181251
ns/iter (± 132565966
)1.00
es/base/parallel/hygiene/typescript
3228303257
ns/iter (± 66424142
)3199912161
ns/iter (± 44312676
)1.01
babelify-only
494842
ns/iter (± 3284
)499681
ns/iter (± 16069
)0.99
parse_and_babelify_angular
37270830
ns/iter (± 2770562
)42425845
ns/iter (± 1896448
)0.88
parse_and_babelify_backbone
4329236
ns/iter (± 120416
)4383668
ns/iter (± 133450
)0.99
parse_and_babelify_jquery
28093426
ns/iter (± 239800
)28493179
ns/iter (± 468178
)0.99
parse_and_babelify_jquery_mobile
50148630
ns/iter (± 1041334
)51919100
ns/iter (± 872400
)0.97
parse_and_babelify_mootools
25215179
ns/iter (± 315373
)25943540
ns/iter (± 271046
)0.97
parse_and_babelify_underscore
3637254
ns/iter (± 19248
)3682857
ns/iter (± 9871
)0.99
parse_and_babelify_yui
23364755
ns/iter (± 619737
)23805352
ns/iter (± 574152
)0.98
html/minify/document/css_spec
45558091
ns/iter (± 879706
)45117276
ns/iter (± 141180
)1.01
html/minify/document/github
18216688
ns/iter (± 53450
)18065852
ns/iter (± 26741
)1.01
html/minify/document/stackoverflow
16609660
ns/iter (± 767915
)16396169
ns/iter (± 61342
)1.01
html/minify/document_fragment/css_spec
44310087
ns/iter (± 155623
)44153697
ns/iter (± 133371
)1.00
html/minify/document_fragment/github
17838503
ns/iter (± 31563
)17799633
ns/iter (± 25112
)1.00
html/minify/document_fragment/stackoverflow
16315978
ns/iter (± 45920
)16247271
ns/iter (± 36637
)1.00
html/document/visitor/compare/clone
166689
ns/iter (± 1021
)165586
ns/iter (± 2712
)1.01
html/document/visitor/compare/visit_mut_span
181661
ns/iter (± 3390
)181403
ns/iter (± 1269
)1.00
html/document/visitor/compare/visit_mut_span_panic
190704
ns/iter (± 7145
)187782
ns/iter (± 8472
)1.02
html/document/visitor/compare/fold_span
228840
ns/iter (± 1269
)224396
ns/iter (± 1920
)1.02
html/document/visitor/compare/fold_span_panic
278354
ns/iter (± 1326
)276049
ns/iter (± 2948
)1.01
html/document_fragment/visitor/compare/clone
165814
ns/iter (± 699
)163274
ns/iter (± 1128
)1.02
html/document_fragment/visitor/compare/visit_mut_span
181845
ns/iter (± 1145
)178840
ns/iter (± 1600
)1.02
html/document_fragment/visitor/compare/visit_mut_span_panic
187545
ns/iter (± 1300
)186259
ns/iter (± 545
)1.01
html/document_fragment/visitor/compare/fold_span
228095
ns/iter (± 866
)228105
ns/iter (± 2134
)1.00
html/document_fragment/visitor/compare/fold_span_panic
278111
ns/iter (± 904
)277690
ns/iter (± 675
)1.00
html/lexer/css_2021_spec
13107241
ns/iter (± 21383
)13081346
ns/iter (± 23416
)1.00
html/lexer/github_com_17_05_2022
5073616
ns/iter (± 86065
)4966134
ns/iter (± 48620
)1.02
html/lexer/stackoverflow_com_17_05_2022
4806228
ns/iter (± 4352
)4742863
ns/iter (± 48843
)1.01
html/parser/parser_document/css_2021_spec
26647057
ns/iter (± 337826
)25686927
ns/iter (± 94589
)1.04
html/parser/parser_document/github_com_17_05_2022
8775629
ns/iter (± 39403
)8583346
ns/iter (± 28978
)1.02
html/parser/parser_document/stackoverflow_com_17_05_2022
7678394
ns/iter (± 20544
)7504690
ns/iter (± 24864
)1.02
html/parser/parser_document_fragment/css_2021_spec
26403644
ns/iter (± 181686
)25528096
ns/iter (± 71251
)1.03
html/parser/parser_document_fragment/github_com_17_05_2022
8683409
ns/iter (± 39377
)8643234
ns/iter (± 7078
)1.00
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7619591
ns/iter (± 14804
)7480995
ns/iter (± 53998
)1.02
This comment was automatically generated by workflow using github-action-benchmark.