Skip to content

Commit

Permalink
feat(es/typescript): Improve fast TS strip (#9166)
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari authored Jul 6, 2024
1 parent d0c0d64 commit ee8dc28
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 145 deletions.
Loading

1 comment on commit ee8dc28

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ee8dc28 Previous: c5acafe Ratio
es/full/bugs-1 268569 ns/iter (± 2299) 278446 ns/iter (± 9530) 0.96
es/full/minify/libraries/antd 1632015782 ns/iter (± 33257094) 1782028259 ns/iter (± 61029588) 0.92
es/full/minify/libraries/d3 330406775 ns/iter (± 1409994) 332187347 ns/iter (± 1807489) 0.99
es/full/minify/libraries/echarts 1345683405 ns/iter (± 4330959) 1364210309 ns/iter (± 4207160) 0.99
es/full/minify/libraries/jquery 100420569 ns/iter (± 85372) 100706180 ns/iter (± 180796) 1.00
es/full/minify/libraries/lodash 111574557 ns/iter (± 402229) 111335457 ns/iter (± 381555) 1.00
es/full/minify/libraries/moment 58531351 ns/iter (± 76147) 58569224 ns/iter (± 203632) 1.00
es/full/minify/libraries/react 18189043 ns/iter (± 21253) 18152787 ns/iter (± 16685) 1.00
es/full/minify/libraries/terser 265107173 ns/iter (± 632846) 265859193 ns/iter (± 778765) 1.00
es/full/minify/libraries/three 446851981 ns/iter (± 5610033) 452472679 ns/iter (± 1708451) 0.99
es/full/minify/libraries/typescript 3068402896 ns/iter (± 9022888) 3086423273 ns/iter (± 11803573) 0.99
es/full/minify/libraries/victory 678223463 ns/iter (± 2736929) 687014469 ns/iter (± 6692255) 0.99
es/full/minify/libraries/vue 141957573 ns/iter (± 244667) 142242196 ns/iter (± 219493) 1.00
es/full/codegen/es3 57798 ns/iter (± 222) 58107 ns/iter (± 214) 0.99
es/full/codegen/es5 57996 ns/iter (± 154) 58473 ns/iter (± 297) 0.99
es/full/codegen/es2015 58062 ns/iter (± 424) 58269 ns/iter (± 102) 1.00
es/full/codegen/es2016 58101 ns/iter (± 222) 58149 ns/iter (± 173) 1.00
es/full/codegen/es2017 57871 ns/iter (± 398) 58334 ns/iter (± 263) 0.99
es/full/codegen/es2018 58140 ns/iter (± 307) 58225 ns/iter (± 543) 1.00
es/full/codegen/es2019 58076 ns/iter (± 203) 58108 ns/iter (± 78) 1.00
es/full/codegen/es2020 58004 ns/iter (± 238) 58333 ns/iter (± 231) 0.99
es/full/all/es3 159260784 ns/iter (± 738835) 159655977 ns/iter (± 841496) 1.00
es/full/all/es5 153848449 ns/iter (± 852922) 153708814 ns/iter (± 420282) 1.00
es/full/all/es2015 113620902 ns/iter (± 1479095) 114225474 ns/iter (± 553180) 0.99
es/full/all/es2016 112699534 ns/iter (± 752569) 112918600 ns/iter (± 857100) 1.00
es/full/all/es2017 112220925 ns/iter (± 591326) 112521809 ns/iter (± 833824) 1.00
es/full/all/es2018 110467025 ns/iter (± 714687) 110614645 ns/iter (± 847800) 1.00
es/full/all/es2019 109456381 ns/iter (± 779062) 110297201 ns/iter (± 741610) 0.99
es/full/all/es2020 105971462 ns/iter (± 1051535) 106564956 ns/iter (± 627515) 0.99
es/full/parser 444285 ns/iter (± 3131) 450039 ns/iter (± 3327) 0.99
es/full/base/fixer 15362 ns/iter (± 48) 15229 ns/iter (± 68) 1.01
es/full/base/resolver_and_hygiene 79755 ns/iter (± 332) 79000 ns/iter (± 176) 1.01
serialization of serde 276 ns/iter (± 6) 272 ns/iter (± 2) 1.01
css/minify/libraries/bootstrap 21723403 ns/iter (± 289660) 21824261 ns/iter (± 156030) 1.00
css/visitor/compare/clone 1386553 ns/iter (± 17023) 1394247 ns/iter (± 7278) 0.99
css/visitor/compare/visit_mut_span 1514262 ns/iter (± 9339) 1534180 ns/iter (± 16621) 0.99
css/visitor/compare/visit_mut_span_panic 1536080 ns/iter (± 14163) 1536597 ns/iter (± 24999) 1.00
css/visitor/compare/fold_span 2026837 ns/iter (± 7373) 2036059 ns/iter (± 12079) 1.00
css/visitor/compare/fold_span_panic 2145259 ns/iter (± 4624) 2193931 ns/iter (± 21105) 0.98
css/lexer/bootstrap_5_1_3 3516269 ns/iter (± 7058) 3508314 ns/iter (± 6810) 1.00
css/lexer/foundation_6_7_4 2843644 ns/iter (± 12887) 2825458 ns/iter (± 2411) 1.01
css/lexer/tailwind_3_1_1 542873 ns/iter (± 340) 540307 ns/iter (± 539) 1.00
css/parser/bootstrap_5_1_3 15879248 ns/iter (± 25623) 15970125 ns/iter (± 69688) 0.99
css/parser/foundation_6_7_4 12724487 ns/iter (± 32191) 12758411 ns/iter (± 26990) 1.00
css/parser/tailwind_3_1_1 2524447 ns/iter (± 2403) 2513264 ns/iter (± 6711) 1.00
es/codegen/colors 718478 ns/iter (± 393623) 724676 ns/iter (± 393997) 0.99
es/codegen/large 2999299 ns/iter (± 1574057) 2991484 ns/iter (± 1578295) 1.00
es/codegen/with-parser/colors 40791 ns/iter (± 331) 40479 ns/iter (± 170) 1.01
es/codegen/with-parser/large 454450 ns/iter (± 1078) 456467 ns/iter (± 23531) 1.00
es/minify/libraries/antd 1404739275 ns/iter (± 24772336) 1477070717 ns/iter (± 15610493) 0.95
es/minify/libraries/d3 284262836 ns/iter (± 11436433) 293850303 ns/iter (± 3840218) 0.97
es/minify/libraries/echarts 1145978385 ns/iter (± 10990993) 1234862888 ns/iter (± 8410894) 0.93
es/minify/libraries/jquery 82307529 ns/iter (± 474164) 83262959 ns/iter (± 385302) 0.99
es/minify/libraries/lodash 104357092 ns/iter (± 159649) 105371549 ns/iter (± 261442) 0.99
es/minify/libraries/moment 47956894 ns/iter (± 145448) 48345687 ns/iter (± 85012) 0.99
es/minify/libraries/react 16204119 ns/iter (± 16078) 16327608 ns/iter (± 15729) 0.99
es/minify/libraries/terser 216718530 ns/iter (± 708048) 223958820 ns/iter (± 1609387) 0.97
es/minify/libraries/three 365041056 ns/iter (± 5393887) 383336407 ns/iter (± 4356380) 0.95
es/minify/libraries/typescript 2716806859 ns/iter (± 13287436) 2816400125 ns/iter (± 7684950) 0.96
es/minify/libraries/victory 569995722 ns/iter (± 8936781) 618958515 ns/iter (± 6695328) 0.92
es/minify/libraries/vue 120365063 ns/iter (± 1186490) 122224192 ns/iter (± 804270) 0.98
es/visitor/compare/clone 1705508 ns/iter (± 5736) 1733688 ns/iter (± 10372) 0.98
es/visitor/compare/visit_mut_span 2043306 ns/iter (± 4914) 2069557 ns/iter (± 9023) 0.99
es/visitor/compare/visit_mut_span_panic 2048671 ns/iter (± 45902) 2057593 ns/iter (± 73507) 1.00
es/visitor/compare/fold_span 2749859 ns/iter (± 8076) 2776056 ns/iter (± 16927) 0.99
es/visitor/compare/fold_span_panic 2790336 ns/iter (± 8719) 2802432 ns/iter (± 15138) 1.00
es/lexer/colors 9476 ns/iter (± 98) 9472 ns/iter (± 49) 1.00
es/lexer/angular 4974965 ns/iter (± 17095) 4937837 ns/iter (± 8870) 1.01
es/lexer/backbone 632467 ns/iter (± 1500) 648707 ns/iter (± 4029) 0.97
es/lexer/jquery 3716443 ns/iter (± 19925) 3631996 ns/iter (± 17315) 1.02
es/lexer/jquery mobile 5517431 ns/iter (± 17886) 5389225 ns/iter (± 10534) 1.02
es/lexer/mootools 2930004 ns/iter (± 12969) 2869697 ns/iter (± 11223) 1.02
es/lexer/underscore 543811 ns/iter (± 2046) 528010 ns/iter (± 2135) 1.03
es/lexer/three 16166161 ns/iter (± 28819) 16031752 ns/iter (± 19315) 1.01
es/lexer/yui 2992269 ns/iter (± 4975) 2917399 ns/iter (± 3764) 1.03
es/lexer/cal-com 13104116 ns/iter (± 471377) 13063706 ns/iter (± 22587) 1.00
es/lexer/typescript 90894015 ns/iter (± 339396) 91916553 ns/iter (± 270344) 0.99
es/parser/colors 24018 ns/iter (± 133) 23945 ns/iter (± 94) 1.00
es/parser/angular 12675733 ns/iter (± 81512) 12742540 ns/iter (± 114391) 0.99
es/parser/backbone 1836472 ns/iter (± 9835) 1832192 ns/iter (± 6631) 1.00
es/parser/jquery 10075912 ns/iter (± 55284) 10135073 ns/iter (± 54978) 0.99
es/parser/jquery mobile 15204611 ns/iter (± 94766) 15222777 ns/iter (± 170597) 1.00
es/parser/mootools 7882630 ns/iter (± 18323) 7897301 ns/iter (± 95496) 1.00
es/parser/underscore 1598032 ns/iter (± 9336) 1596319 ns/iter (± 7518) 1.00
es/parser/three 43222822 ns/iter (± 215263) 44664911 ns/iter (± 329139) 0.97
es/parser/yui 7481716 ns/iter (± 33839) 7533019 ns/iter (± 46772) 0.99
es/parser/cal-com 39460645 ns/iter (± 326680) 40357976 ns/iter (± 1000743) 0.98
es/parser/typescript 267607016 ns/iter (± 1040671) 269775765 ns/iter (± 4752859) 0.99
es/preset-env/usage/builtin_type 137011 ns/iter (± 33720) 136228 ns/iter (± 34098) 1.01
es/preset-env/usage/property 16624 ns/iter (± 158) 16206 ns/iter (± 188) 1.03
es/resolver/typescript 96872048 ns/iter (± 2492384) 101621470 ns/iter (± 2643193) 0.95
es/fixer/typescript 81651198 ns/iter (± 2884347) 82377763 ns/iter (± 3202964) 0.99
es/hygiene/typescript 184553086 ns/iter (± 3720131) 188819084 ns/iter (± 2290613) 0.98
es/resolver_with_hygiene/typescript 312241186 ns/iter (± 4240935) 322717206 ns/iter (± 4483156) 0.97
es/visitor/base-perf/module_clone 56731 ns/iter (± 501) 56590 ns/iter (± 393) 1.00
es/visitor/base-perf/fold_empty 59929 ns/iter (± 2145) 59910 ns/iter (± 470) 1.00
es/visitor/base-perf/fold_noop_impl_all 60269 ns/iter (± 1065) 59854 ns/iter (± 748) 1.01
es/visitor/base-perf/fold_noop_impl_vec 59647 ns/iter (± 840) 59806 ns/iter (± 432) 1.00
es/visitor/base-perf/boxing_boxed_clone 59 ns/iter (± 0) 61 ns/iter (± 0) 0.97
es/visitor/base-perf/boxing_unboxed_clone 47 ns/iter (± 0) 47 ns/iter (± 0) 1
es/visitor/base-perf/boxing_boxed 105 ns/iter (± 1) 109 ns/iter (± 0) 0.96
es/visitor/base-perf/boxing_unboxed 80 ns/iter (± 1) 81 ns/iter (± 0) 0.99
es/visitor/base-perf/visit_contains_this 2486 ns/iter (± 43) 2469 ns/iter (± 13) 1.01
es/base/parallel/resolver/typescript 2468111836 ns/iter (± 157716426) 2509041623 ns/iter (± 234031646) 0.98
es/base/parallel/hygiene/typescript 3216836585 ns/iter (± 56809267) 3314866617 ns/iter (± 64027221) 0.97
babelify-only 490363 ns/iter (± 12437) 497010 ns/iter (± 5442) 0.99
parse_and_babelify_angular 44275698 ns/iter (± 1629228) 44360190 ns/iter (± 816248) 1.00
parse_and_babelify_backbone 4339842 ns/iter (± 128966) 4364365 ns/iter (± 153408) 0.99
parse_and_babelify_jquery 28102766 ns/iter (± 202987) 28477375 ns/iter (± 268875) 0.99
parse_and_babelify_jquery_mobile 48432000 ns/iter (± 646772) 48712513 ns/iter (± 583729) 0.99
parse_and_babelify_mootools 25424391 ns/iter (± 239087) 27721436 ns/iter (± 1300418) 0.92
parse_and_babelify_underscore 3672927 ns/iter (± 14076) 3659979 ns/iter (± 7128) 1.00
parse_and_babelify_yui 24984220 ns/iter (± 1285566) 29201263 ns/iter (± 1780729) 0.86
html/minify/document/css_spec 45812902 ns/iter (± 256245) 47726934 ns/iter (± 373808) 0.96
html/minify/document/github 18578586 ns/iter (± 58914) 18829374 ns/iter (± 182817) 0.99
html/minify/document/stackoverflow 17111172 ns/iter (± 362163) 17064235 ns/iter (± 576653) 1.00
html/minify/document_fragment/css_spec 44580464 ns/iter (± 75728) 48148653 ns/iter (± 909671) 0.93
html/minify/document_fragment/github 18242913 ns/iter (± 34238) 18794166 ns/iter (± 107341) 0.97
html/minify/document_fragment/stackoverflow 16546645 ns/iter (± 9581) 16968043 ns/iter (± 176435) 0.98
html/document/visitor/compare/clone 165943 ns/iter (± 806) 166408 ns/iter (± 1363) 1.00
html/document/visitor/compare/visit_mut_span 183641 ns/iter (± 792) 185331 ns/iter (± 1568) 0.99
html/document/visitor/compare/visit_mut_span_panic 188610 ns/iter (± 2453) 189589 ns/iter (± 1651) 0.99
html/document/visitor/compare/fold_span 231920 ns/iter (± 1219) 230013 ns/iter (± 1102) 1.01
html/document/visitor/compare/fold_span_panic 279060 ns/iter (± 1331) 279249 ns/iter (± 960) 1.00
html/document_fragment/visitor/compare/clone 167785 ns/iter (± 804) 167615 ns/iter (± 1000) 1.00
html/document_fragment/visitor/compare/visit_mut_span 183343 ns/iter (± 831) 184066 ns/iter (± 686) 1.00
html/document_fragment/visitor/compare/visit_mut_span_panic 188505 ns/iter (± 1085) 187167 ns/iter (± 673) 1.01
html/document_fragment/visitor/compare/fold_span 231763 ns/iter (± 3890) 229260 ns/iter (± 988) 1.01
html/document_fragment/visitor/compare/fold_span_panic 277897 ns/iter (± 1144) 282191 ns/iter (± 1228) 0.98
html/lexer/css_2021_spec 12885187 ns/iter (± 173672) 12827083 ns/iter (± 170667) 1.00
html/lexer/github_com_17_05_2022 4913665 ns/iter (± 14186) 4912100 ns/iter (± 15268) 1.00
html/lexer/stackoverflow_com_17_05_2022 4672610 ns/iter (± 8007) 4663076 ns/iter (± 11271) 1.00
html/parser/parser_document/css_2021_spec 25570717 ns/iter (± 283376) 25830106 ns/iter (± 195920) 0.99
html/parser/parser_document/github_com_17_05_2022 8590929 ns/iter (± 54017) 8675360 ns/iter (± 15884) 0.99
html/parser/parser_document/stackoverflow_com_17_05_2022 7368971 ns/iter (± 9823) 7511731 ns/iter (± 8337) 0.98
html/parser/parser_document_fragment/css_2021_spec 25134909 ns/iter (± 33705) 25618096 ns/iter (± 38113) 0.98
html/parser/parser_document_fragment/github_com_17_05_2022 8515081 ns/iter (± 28817) 8584238 ns/iter (± 7154) 0.99
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022 7324374 ns/iter (± 8614) 7428027 ns/iter (± 13924) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.