-
-
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.
feat(css/minifier): Compress alpha in a hex (#6653)
- Loading branch information
1 parent
8ed88a7
commit f6292e6
Showing
3 changed files
with
33 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
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
2 changes: 1 addition & 1 deletion
2
crates/swc_css_minifier/tests/fixture/compress-color/output.min.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
f6292e6
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
309207
ns/iter (± 7096
)286022
ns/iter (± 13135
)1.08
es/full/minify/libraries/antd
1759424200
ns/iter (± 22696723
)1744376852
ns/iter (± 18990220
)1.01
es/full/minify/libraries/d3
318153826
ns/iter (± 6287006
)336060453
ns/iter (± 4837801
)0.95
es/full/minify/libraries/echarts
1354015701
ns/iter (± 11719369
)1452237981
ns/iter (± 15115550
)0.93
es/full/minify/libraries/jquery
91720322
ns/iter (± 493471
)91641510
ns/iter (± 995224
)1.00
es/full/minify/libraries/lodash
108252802
ns/iter (± 1044690
)110390016
ns/iter (± 1805746
)0.98
es/full/minify/libraries/moment
53751227
ns/iter (± 585970
)53676939
ns/iter (± 330231
)1.00
es/full/minify/libraries/react
19405021
ns/iter (± 176844
)19743168
ns/iter (± 267956
)0.98
es/full/minify/libraries/terser
264024575
ns/iter (± 7240761
)259859527
ns/iter (± 2917083
)1.02
es/full/minify/libraries/three
476481503
ns/iter (± 9331415
)477643943
ns/iter (± 5658769
)1.00
es/full/minify/libraries/typescript
3310512657
ns/iter (± 20005290
)3288007972
ns/iter (± 17911378
)1.01
es/full/minify/libraries/victory
725260232
ns/iter (± 16226301
)686275753
ns/iter (± 7983378
)1.06
es/full/minify/libraries/vue
134175214
ns/iter (± 1364285
)133471319
ns/iter (± 2100007
)1.01
es/full/codegen/es3
27348
ns/iter (± 52
)27591
ns/iter (± 60
)0.99
es/full/codegen/es5
27342
ns/iter (± 43
)27589
ns/iter (± 42
)0.99
es/full/codegen/es2015
27325
ns/iter (± 65
)27623
ns/iter (± 54
)0.99
es/full/codegen/es2016
27329
ns/iter (± 49
)27582
ns/iter (± 38
)0.99
es/full/codegen/es2017
27367
ns/iter (± 37
)27573
ns/iter (± 51
)0.99
es/full/codegen/es2018
27336
ns/iter (± 59
)27544
ns/iter (± 62
)0.99
es/full/codegen/es2019
27287
ns/iter (± 89
)27588
ns/iter (± 33
)0.99
es/full/codegen/es2020
27304
ns/iter (± 55
)27603
ns/iter (± 82
)0.99
es/full/all/es3
169705553
ns/iter (± 2080938
)170253867
ns/iter (± 3473648
)1.00
es/full/all/es5
162150336
ns/iter (± 2105258
)159807357
ns/iter (± 3601818
)1.01
es/full/all/es2015
121699598
ns/iter (± 1395823
)120832784
ns/iter (± 1718601
)1.01
es/full/all/es2016
120777996
ns/iter (± 1373607
)119675352
ns/iter (± 1994879
)1.01
es/full/all/es2017
120414674
ns/iter (± 1673912
)118464402
ns/iter (± 1623128
)1.02
es/full/all/es2018
117394463
ns/iter (± 1289911
)117956951
ns/iter (± 1668312
)1.00
es/full/all/es2019
117310625
ns/iter (± 984318
)117473040
ns/iter (± 1498489
)1.00
es/full/all/es2020
112460846
ns/iter (± 1416556
)112291656
ns/iter (± 2626979
)1.00
es/full/parser
517156
ns/iter (± 7837
)511558
ns/iter (± 8650
)1.01
es/full/base/fixer
21969
ns/iter (± 55
)22218
ns/iter (± 35
)0.99
es/full/base/resolver_and_hygiene
78521
ns/iter (± 92
)78517
ns/iter (± 97
)1.00
serialization of ast node
142
ns/iter (± 0
)144
ns/iter (± 0
)0.99
serialization of serde
124
ns/iter (± 0
)127
ns/iter (± 0
)0.98
css/minify/libraries/bootstrap
27044765
ns/iter (± 225510
)27046535
ns/iter (± 99164
)1.00
css/visitor/compare/clone
2087800
ns/iter (± 20482
)2089243
ns/iter (± 16173
)1.00
css/visitor/compare/visit_mut_span
2276922
ns/iter (± 5874
)2262021
ns/iter (± 3896
)1.01
css/visitor/compare/visit_mut_span_panic
2328332
ns/iter (± 4416
)2314377
ns/iter (± 5749
)1.01
css/visitor/compare/fold_span
3034854
ns/iter (± 28142
)2973867
ns/iter (± 21117
)1.02
css/visitor/compare/fold_span_panic
3168966
ns/iter (± 15101
)3104845
ns/iter (± 24288
)1.02
css/lexer/bootstrap_5_1_3
5195277
ns/iter (± 5439
)5180615
ns/iter (± 1248
)1.00
css/lexer/foundation_6_7_4
4402143
ns/iter (± 2159
)4406749
ns/iter (± 1550
)1.00
css/lexer/tailwind_3_1_1
826518
ns/iter (± 1063
)831449
ns/iter (± 215
)0.99
css/parser/bootstrap_5_1_3
20889147
ns/iter (± 119979
)20633481
ns/iter (± 23123
)1.01
css/parser/foundation_6_7_4
16609517
ns/iter (± 46186
)16526735
ns/iter (± 50213
)1.01
css/parser/tailwind_3_1_1
3201624
ns/iter (± 8100
)3187721
ns/iter (± 4977
)1.00
es/codegen/colors
323860
ns/iter (± 182292
)327656
ns/iter (± 184310
)0.99
es/codegen/large
1223919
ns/iter (± 647917
)1317456
ns/iter (± 700906
)0.93
es/codegen/with-parser/colors
46748
ns/iter (± 253
)45919
ns/iter (± 319
)1.02
es/codegen/with-parser/large
510314
ns/iter (± 1300
)512102
ns/iter (± 1530
)1.00
es/minify/libraries/antd
1565011367
ns/iter (± 14736906
)1502249247
ns/iter (± 12240743
)1.04
es/minify/libraries/d3
266267340
ns/iter (± 4293638
)285628186
ns/iter (± 5474208
)0.93
es/minify/libraries/echarts
1174531923
ns/iter (± 8630245
)1268655537
ns/iter (± 7637108
)0.93
es/minify/libraries/jquery
79407722
ns/iter (± 1205973
)79534946
ns/iter (± 1285335
)1.00
es/minify/libraries/lodash
97163293
ns/iter (± 692438
)97702484
ns/iter (± 1527439
)0.99
es/minify/libraries/moment
46741044
ns/iter (± 312084
)46275312
ns/iter (± 384883
)1.01
es/minify/libraries/react
17125052
ns/iter (± 107873
)17327658
ns/iter (± 215725
)0.99
es/minify/libraries/terser
223251806
ns/iter (± 3051699
)218184250
ns/iter (± 2675295
)1.02
es/minify/libraries/three
396707555
ns/iter (± 9844981
)394440249
ns/iter (± 7841759
)1.01
es/minify/libraries/typescript
2862747534
ns/iter (± 20975164
)2849935328
ns/iter (± 15001807
)1.00
es/minify/libraries/victory
644355927
ns/iter (± 17125285
)608583045
ns/iter (± 10804419
)1.06
es/minify/libraries/vue
118120076
ns/iter (± 661853
)119587427
ns/iter (± 2734028
)0.99
es/visitor/compare/clone
2440703
ns/iter (± 27332
)2398978
ns/iter (± 22417
)1.02
es/visitor/compare/visit_mut_span
2825175
ns/iter (± 10689
)2773451
ns/iter (± 52536
)1.02
es/visitor/compare/visit_mut_span_panic
2867698
ns/iter (± 6084
)2818886
ns/iter (± 5724
)1.02
es/visitor/compare/fold_span
3988659
ns/iter (± 20739
)3933738
ns/iter (± 6864
)1.01
es/visitor/compare/fold_span_panic
4147453
ns/iter (± 18372
)4054650
ns/iter (± 9077
)1.02
es/lexer/colors
17436
ns/iter (± 27
)17235
ns/iter (± 35
)1.01
es/lexer/angular
8273262
ns/iter (± 11230
)8214843
ns/iter (± 2060
)1.01
es/lexer/backbone
1084078
ns/iter (± 3595
)1071218
ns/iter (± 646
)1.01
es/lexer/jquery
5998771
ns/iter (± 19784
)5950367
ns/iter (± 5188
)1.01
es/lexer/jquery mobile
9279436
ns/iter (± 17166
)9162235
ns/iter (± 4556
)1.01
es/lexer/mootools
4677207
ns/iter (± 9958
)4668230
ns/iter (± 2496
)1.00
es/lexer/underscore
904569
ns/iter (± 2174
)895010
ns/iter (± 380
)1.01
es/lexer/three
28087953
ns/iter (± 39976
)27867692
ns/iter (± 14292
)1.01
es/lexer/yui
5066768
ns/iter (± 6874
)5056598
ns/iter (± 1617
)1.00
es/parser/colors
31018
ns/iter (± 182
)30108
ns/iter (± 184
)1.03
es/parser/angular
16284823
ns/iter (± 182870
)15452448
ns/iter (± 316746
)1.05
es/parser/backbone
2328289
ns/iter (± 16419
)2292329
ns/iter (± 12412
)1.02
es/parser/jquery
12630331
ns/iter (± 68595
)12417463
ns/iter (± 60911
)1.02
es/parser/jquery mobile
20908903
ns/iter (± 333184
)19750669
ns/iter (± 324054
)1.06
es/parser/mootools
9647181
ns/iter (± 41951
)9514956
ns/iter (± 36883
)1.01
es/parser/underscore
1971931
ns/iter (± 11187
)1937814
ns/iter (± 10746
)1.02
es/parser/three
61036430
ns/iter (± 376763
)58204744
ns/iter (± 649800
)1.05
es/parser/yui
9708761
ns/iter (± 60673
)9469659
ns/iter (± 49011
)1.03
es/preset-env/usage/builtin_type
140032
ns/iter (± 30884
)145033
ns/iter (± 33348
)0.97
es/preset-env/usage/property
21263
ns/iter (± 50
)21174
ns/iter (± 91
)1.00
es/resolver/typescript
123483671
ns/iter (± 2780954
)121244946
ns/iter (± 2375826
)1.02
es/fixer/typescript
96760317
ns/iter (± 797358
)97635328
ns/iter (± 5341109
)0.99
es/hygiene/typescript
194853126
ns/iter (± 2606973
)191337845
ns/iter (± 1225294
)1.02
es/resolver_with_hygiene/typescript
339454297
ns/iter (± 2308667
)330769293
ns/iter (± 2045221
)1.03
es/visitor/base-perf/module_clone
75257
ns/iter (± 846
)75214
ns/iter (± 980
)1.00
es/visitor/base-perf/fold_empty
86803
ns/iter (± 1517
)86693
ns/iter (± 986
)1.00
es/visitor/base-perf/fold_noop_impl_all
85712
ns/iter (± 677
)87071
ns/iter (± 977
)0.98
es/visitor/base-perf/fold_noop_impl_vec
85954
ns/iter (± 2091
)87644
ns/iter (± 915
)0.98
es/visitor/base-perf/boxing_boxed_clone
56
ns/iter (± 0
)54
ns/iter (± 0
)1.04
es/visitor/base-perf/boxing_unboxed_clone
59
ns/iter (± 0
)58
ns/iter (± 0
)1.02
es/visitor/base-perf/boxing_boxed
103
ns/iter (± 0
)102
ns/iter (± 0
)1.01
es/visitor/base-perf/boxing_unboxed
102
ns/iter (± 0
)103
ns/iter (± 0
)0.99
es/visitor/base-perf/visit_contains_this
3585
ns/iter (± 76
)3664
ns/iter (± 106
)0.98
es/base/parallel/resolver/typescript
5547223772
ns/iter (± 354900143
)5313514379
ns/iter (± 414906563
)1.04
es/base/parallel/hygiene/typescript
2318128377
ns/iter (± 36941691
)2252731443
ns/iter (± 39212756
)1.03
misc/visitors/time-complexity/time 5
93
ns/iter (± 0
)106
ns/iter (± 0
)0.88
misc/visitors/time-complexity/time 10
326
ns/iter (± 1
)345
ns/iter (± 0
)0.94
misc/visitors/time-complexity/time 15
647
ns/iter (± 11
)672
ns/iter (± 0
)0.96
misc/visitors/time-complexity/time 20
1192
ns/iter (± 1
)1254
ns/iter (± 0
)0.95
misc/visitors/time-complexity/time 40
6162
ns/iter (± 5
)6819
ns/iter (± 12
)0.90
misc/visitors/time-complexity/time 60
15515
ns/iter (± 16
)17185
ns/iter (± 7
)0.90
es/full-target/es2016
188454
ns/iter (± 450
)187487
ns/iter (± 376
)1.01
es/full-target/es2017
183792
ns/iter (± 606
)180948
ns/iter (± 454
)1.02
es/full-target/es2018
172628
ns/iter (± 397
)170318
ns/iter (± 460
)1.01
es2020_nullish_coalescing
66916
ns/iter (± 129
)66002
ns/iter (± 500
)1.01
es2020_optional_chaining
96484
ns/iter (± 239
)94357
ns/iter (± 942
)1.02
es2022_class_properties
93661
ns/iter (± 157
)92832
ns/iter (± 121
)1.01
es2018_object_rest_spread
71529
ns/iter (± 142
)70618
ns/iter (± 164
)1.01
es2019_optional_catch_binding
61141
ns/iter (± 136
)60008
ns/iter (± 165
)1.02
es2017_async_to_generator
61662
ns/iter (± 92
)60659
ns/iter (± 110
)1.02
es2016_exponentiation
65158
ns/iter (± 146
)63833
ns/iter (± 129
)1.02
es2015_arrow
70089
ns/iter (± 262
)68563
ns/iter (± 262
)1.02
es2015_block_scoped_fn
66422
ns/iter (± 164
)65030
ns/iter (± 174
)1.02
es2015_block_scoping
156981
ns/iter (± 8984
)155635
ns/iter (± 8599
)1.01
es2015_classes
117311
ns/iter (± 421
)115402
ns/iter (± 370
)1.02
es2015_computed_props
60952
ns/iter (± 94
)59925
ns/iter (± 85
)1.02
es2015_destructuring
116384
ns/iter (± 310
)115494
ns/iter (± 274
)1.01
es2015_duplicate_keys
64032
ns/iter (± 106
)62441
ns/iter (± 93
)1.03
es2015_parameters
80002
ns/iter (± 154
)78195
ns/iter (± 202
)1.02
es2015_fn_name
66741
ns/iter (± 599
)65592
ns/iter (± 545
)1.02
es2015_for_of
64127
ns/iter (± 211
)63035
ns/iter (± 118
)1.02
es2015_instanceof
63303
ns/iter (± 99
)61942
ns/iter (± 85
)1.02
es2015_shorthand_property
61139
ns/iter (± 117
)59918
ns/iter (± 92
)1.02
es2015_spread
60909
ns/iter (± 100
)60122
ns/iter (± 98
)1.01
es2015_sticky_regex
62436
ns/iter (± 119
)61058
ns/iter (± 121
)1.02
es2015_typeof_symbol
62251
ns/iter (± 133
)61285
ns/iter (± 132
)1.02
es/transform/baseline/base
51858
ns/iter (± 177
)50638
ns/iter (± 92
)1.02
es/transform/baseline/common_reserved_word
62426
ns/iter (± 181
)61397
ns/iter (± 110
)1.02
es/transform/baseline/common_typescript
146268
ns/iter (± 1571
)141600
ns/iter (± 3640
)1.03
es/target/es3
169683
ns/iter (± 360
)168993
ns/iter (± 326
)1.00
es/target/es2015
630460
ns/iter (± 1718
)629371
ns/iter (± 1088
)1.00
es/target/es2016
65260
ns/iter (± 106
)63927
ns/iter (± 180
)1.02
es/target/es2017
61700
ns/iter (± 107
)60761
ns/iter (± 78
)1.02
es/target/es2018
81604
ns/iter (± 143
)80633
ns/iter (± 225
)1.01
es/target/es2020
132458
ns/iter (± 241
)131816
ns/iter (± 322
)1.00
babelify-only
678337
ns/iter (± 1417
)672148
ns/iter (± 1487
)1.01
parse_and_babelify_angular
43983542
ns/iter (± 1372984
)41143391
ns/iter (± 535060
)1.07
parse_and_babelify_backbone
5442800
ns/iter (± 40853
)5357855
ns/iter (± 40683
)1.02
parse_and_babelify_jquery
33682625
ns/iter (± 363901
)32646330
ns/iter (± 459751
)1.03
parse_and_babelify_jquery_mobile
57128265
ns/iter (± 982615
)55211582
ns/iter (± 1414070
)1.03
parse_and_babelify_mootools
35189609
ns/iter (± 259922
)33815679
ns/iter (± 471058
)1.04
parse_and_babelify_underscore
4381157
ns/iter (± 31569
)4281416
ns/iter (± 59813
)1.02
parse_and_babelify_yui
34072537
ns/iter (± 586715
)32722623
ns/iter (± 765088
)1.04
html/minify/document/css_spec
42246432
ns/iter (± 341272
)41740825
ns/iter (± 238329
)1.01
html/minify/document/github
17421332
ns/iter (± 45959
)17408669
ns/iter (± 40623
)1.00
html/minify/document/stackoverflow
15541965
ns/iter (± 76707
)15559179
ns/iter (± 43297
)1.00
html/minify/document_fragment/css_spec
40231047
ns/iter (± 275830
)41862466
ns/iter (± 269595
)0.96
html/minify/document_fragment/github
16686330
ns/iter (± 52134
)17141092
ns/iter (± 27882
)0.97
html/minify/document_fragment/stackoverflow
15081962
ns/iter (± 23294
)15764923
ns/iter (± 36291
)0.96
html/document/visitor/compare/clone
342062
ns/iter (± 2136
)339021
ns/iter (± 4011
)1.01
html/document/visitor/compare/visit_mut_span
364565
ns/iter (± 2367
)366108
ns/iter (± 1735
)1.00
html/document/visitor/compare/visit_mut_span_panic
375491
ns/iter (± 2343
)373900
ns/iter (± 1159
)1.00
html/document/visitor/compare/fold_span
407491
ns/iter (± 1828
)401919
ns/iter (± 1075
)1.01
html/document/visitor/compare/fold_span_panic
464172
ns/iter (± 3177
)454909
ns/iter (± 2708
)1.02
html/document_fragment/visitor/compare/clone
336309
ns/iter (± 2069
)333559
ns/iter (± 1764
)1.01
html/document_fragment/visitor/compare/visit_mut_span
362611
ns/iter (± 1347
)359805
ns/iter (± 2145
)1.01
html/document_fragment/visitor/compare/visit_mut_span_panic
374448
ns/iter (± 2100
)367756
ns/iter (± 2347
)1.02
html/document_fragment/visitor/compare/fold_span
407141
ns/iter (± 2460
)403947
ns/iter (± 2300
)1.01
html/document_fragment/visitor/compare/fold_span_panic
462132
ns/iter (± 1718
)458763
ns/iter (± 2513
)1.01
html/lexer/css_2021_spec
15625598
ns/iter (± 12902
)15617892
ns/iter (± 9260
)1.00
html/lexer/github_com_17_05_2022
6029775
ns/iter (± 3976
)6074076
ns/iter (± 6409
)0.99
html/lexer/stackoverflow_com_17_05_2022
5649282
ns/iter (± 8743
)5669093
ns/iter (± 6908
)1.00
html/parser/parser_document/css_2021_spec
25995966
ns/iter (± 208360
)25532707
ns/iter (± 161006
)1.02
html/parser/parser_document/github_com_17_05_2022
8819776
ns/iter (± 13794
)8744169
ns/iter (± 3462
)1.01
html/parser/parser_document/stackoverflow_com_17_05_2022
7744138
ns/iter (± 8267
)7707258
ns/iter (± 3566
)1.00
html/parser/parser_document_fragment/css_2021_spec
26268823
ns/iter (± 156461
)25712038
ns/iter (± 122196
)1.02
html/parser/parser_document_fragment/github_com_17_05_2022
8775546
ns/iter (± 17496
)8759074
ns/iter (± 4158
)1.00
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7724867
ns/iter (± 9430
)7723481
ns/iter (± 6282
)1.00
This comment was automatically generated by workflow using github-action-benchmark.