Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: bump string_wizard for better performance #292

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

hyf0
Copy link
Member

@hyf0 hyf0 commented Nov 16, 2023

Description

rolldown/string_wizard#9

The problem is that bundling cjs module requre calling MagicString#indent, which was incredibly slow due to lacking of optimization: rolldown/string_wizard@4515818.

┌─────────┬────────────────────┬─────────┬───────────────────┬───────────┬─────────┐
│ (index) │     Task Name      │ ops/sec │ Average Time (ns) │  Margin   │ Samples │
├─────────┼────────────────────┼─────────┼───────────────────┼───────────┼─────────┤
│    0    │ 'rolldown-threejs' │  '109'  │ 9110844.725912267 │ '±10.05%' │   11    │
│    1    │ 'esbuild-threejs'  │  '52'   │ 19223512.59738207 │ '±13.03%' │   10    │
└─────────┴────────────────────┴─────────┴───────────────────┴───────────┴─────────┘
┌─────────┬───────────────────────┬─────────┬────────────────────┬───────────┬─────────┐
│ (index) │       Task Name       │ ops/sec │ Average Time (ns)  │  Margin   │ Samples │
├─────────┼───────────────────────┼─────────┼────────────────────┼───────────┼─────────┤
│    0    │ 'rolldown-threejs10x' │   '9'   │ 102347845.79873085 │ '±10.12%' │   10    │
│    1    │ 'esbuild-threejs10x'  │   '5'   │ 166986120.80067396 │ '±3.19%'  │   10    │
└─────────┴───────────────────────┴─────────┴────────────────────┴───────────┴─────────┘
┌─────────┬────────────────────────────────┬─────────┬────────────────────┬──────────┬─────────┐
│ (index) │           Task Name            │ ops/sec │ Average Time (ns)  │  Margin  │ Samples │
├─────────┼────────────────────────────────┼─────────┼────────────────────┼──────────┼─────────┤
│    0    │ 'rolldown-react_and_react_dom' │  '49'   │ 20094408.302009106 │ '±5.22%' │   10    │
│    1    │ 'esbuild-react_and_react_dom'  │  '45'   │ 21785495.999455452 │ '±3.87%' │   10    │
└─────────┴────────────────────────────────┴─────────┴────────────────────┴──────────┴─────────┘

Test Plan


@hyf0 hyf0 force-pushed the 11-16-perf_bump_string_wizard_for_better_performance branch from 3366981 to 079c922 Compare November 16, 2023 14:57
This was referenced Nov 16, 2023
@hyf0 hyf0 force-pushed the 11-16-feat_support_to_enable_tracing branch from 6601e88 to 4bd31ca Compare November 17, 2023 03:21
@hyf0 hyf0 force-pushed the 11-16-perf_bump_string_wizard_for_better_performance branch from ad93546 to f219c1d Compare November 17, 2023 03:21
@hyf0 hyf0 force-pushed the 11-16-feat_support_to_enable_tracing branch from 4bd31ca to bad653e Compare November 17, 2023 04:46
@hyf0 hyf0 force-pushed the 11-16-perf_bump_string_wizard_for_better_performance branch from f219c1d to 59cb64f Compare November 17, 2023 04:46
@hyf0 hyf0 force-pushed the 11-16-feat_support_to_enable_tracing branch from bad653e to 009fd01 Compare November 17, 2023 05:00
@hyf0 hyf0 force-pushed the 11-16-perf_bump_string_wizard_for_better_performance branch from 59cb64f to 8d8424a Compare November 17, 2023 05:00
@hyf0 hyf0 force-pushed the 11-16-feat_support_to_enable_tracing branch from 009fd01 to 05b89f0 Compare November 17, 2023 05:19
@hyf0 hyf0 force-pushed the 11-16-perf_bump_string_wizard_for_better_performance branch from 8d8424a to 10527dd Compare November 17, 2023 05:19
@hyf0
Copy link
Member Author

hyf0 commented Nov 17, 2023

Merge activity

  • Nov 17, 12:38 AM: @hyf0 started a stack merge that includes this pull request via Graphite.
  • Nov 17, 12:38 AM: Graphite rebased this pull request as part of a merge.
  • Nov 17, 12:39 AM: @hyf0 merged this pull request with Graphite.

Base automatically changed from 11-16-feat_support_to_enable_tracing to main November 17, 2023 05:38
@hyf0 hyf0 force-pushed the 11-16-perf_bump_string_wizard_for_better_performance branch from 10527dd to a184843 Compare November 17, 2023 05:38
@hyf0 hyf0 merged commit 10a884a into main Nov 17, 2023
2 of 5 checks passed
@hyf0 hyf0 deleted the 11-16-perf_bump_string_wizard_for_better_performance branch November 17, 2023 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants