Skip to content

perf(es/resolver): Remove needless allocations#10120

Merged
kdy1 merged 2 commits intoswc-project:mainfrom
xusd320:perf/remove-needless-collect
Feb 28, 2025
Merged

perf(es/resolver): Remove needless allocations#10120
kdy1 merged 2 commits intoswc-project:mainfrom
xusd320:perf/remove-needless-collect

Conversation

@xusd320
Copy link
Copy Markdown
Contributor

@xusd320 xusd320 commented Feb 27, 2025

Description:

Just use iter_mut().for_each directly.

@xusd320 xusd320 requested a review from a team as a code owner February 27, 2025 14:13
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 27, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 27, 2025

🦋 Changeset detected

Latest commit: 8e8bb90

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@xusd320 xusd320 force-pushed the perf/remove-needless-collect branch from dd8824c to 2a62e67 Compare February 27, 2025 14:59
@xusd320 xusd320 changed the title perf: remove needless collect in resolver perf(es/transform): remove needless collect in resolver Feb 27, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Feb 27, 2025

CodSpeed Performance Report

Merging #10120 will degrade performances by 3.44%

Comparing xusd320:perf/remove-needless-collect (8e8bb90) with main (f019d53)

Summary

⚡ 2 improvements
❌ 2 regressions
✅ 187 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
es/full/minify/libraries/moment 104.5 ms 108.2 ms -3.44%
es/minifier/libs/jquery 129 ms 133.1 ms -3.07%
es/minifier/libs/lodash 154.8 ms 148.6 ms +4.19%
es/minifier/libs/moment 87 ms 81.7 ms +6.49%

@kdy1 kdy1 self-assigned this Feb 28, 2025
@kdy1 kdy1 added this to the Planned milestone Feb 28, 2025
@kdy1 kdy1 changed the title perf(es/transform): remove needless collect in resolver perf(es/resolver): Remove needless collect in resolver Feb 28, 2025
@kdy1 kdy1 changed the title perf(es/resolver): Remove needless collect in resolver perf(es/resolver): Remove needless allocations Feb 28, 2025
@kdy1 kdy1 requested a review from a team as a code owner February 28, 2025 01:46
@kdy1 kdy1 merged commit f019d53 into swc-project:main Feb 28, 2025
@kdy1 kdy1 modified the milestones: Planned, v1.11.5 Feb 28, 2025
@swc-project swc-project locked as resolved and limited conversation to collaborators Mar 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants