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(es/minifier): Make mangler faster by merging hash sets into one #3983

Merged
merged 6 commits into from Mar 12, 2022

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Mar 12, 2022

Description:

I'm trying to reproduce benchmark results in https://github.com/privatenumber/minification-benchmarks

Related issue (if exists):


스크린샷 2022-03-12 오후 1 55 53

With RAYON_NUM_THREADS=2

image


After profiling, I improved the performance a lot.
I merged two hashsets into one.

  • antd: 2.4s => 1.7045s
  • d3: 172ms => 155.72ms
  • echarts: 1.1s => 894.69ms
  • jquery: 35ms => 34.951ms
  • lodash: 38.5ms => 39.341ms
  • moment: 21ms => 19.915ms
  • react: 8ms => 7.7071ms
  • terser: 87.132ms => 85.408ms
  • three: 205ms => 191.21 ms
  • typescript: 6.1s => 4.2862 s
  • victory: 691ms => 517.86 ms
  • vue: => 47.745ms

@kdy1 kdy1 changed the title perf(es/minifier): WIP: Profiling... perf(es/minifier): Make mangler faster by merging hash sets Mar 12, 2022
@kdy1 kdy1 changed the title perf(es/minifier): Make mangler faster by merging hash sets perf(es/minifier): Make mangler faster by merging hash sets into one Mar 12, 2022
@kdy1 kdy1 added this to the v1.2.154 milestone Mar 12, 2022
@kdy1 kdy1 marked this pull request as ready for review March 12, 2022 05:52
@kdy1 kdy1 enabled auto-merge (squash) March 12, 2022 05:52
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_ecma_minifier

@kdy1 kdy1 merged commit 107c91d into swc-project:main Mar 12, 2022
@kdy1 kdy1 deleted the perf-minifier branch March 12, 2022 06:16
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

1 participant