Skip to content

perf: use partition_map to avoid clone#9427

Merged
JSerFeng merged 1 commit intomainfrom
fix/module-graph-change
Feb 21, 2025
Merged

perf: use partition_map to avoid clone#9427
JSerFeng merged 1 commit intomainfrom
fix/module-graph-change

Conversation

@JSerFeng
Copy link
Contributor

@JSerFeng JSerFeng commented Feb 21, 2025

Summary

Use partition_map to avoid once unnecessary clone

Equal to:

let mut a = vec![];
let mut b = vec![];

c.for_each(|item| => {
  match item {
    Left(v) => a.push(v);
    Right(v) => b.push(v);
  }
})

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack. labels Feb 21, 2025
@netlify
Copy link

netlify bot commented Feb 21, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 60e358b
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67b81fdbf27fe70008c6e800

@JSerFeng JSerFeng enabled auto-merge (squash) February 21, 2025 06:43
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 21, 2025

CodSpeed Performance Report

Merging #9427 will not alter performance

Comparing fix/module-graph-change (60e358b) with main (5577719)

🎉 Hooray! codspeed-node just leveled up to 4.0.0!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 7 untouched benchmarks

@JSerFeng JSerFeng merged commit f7ec690 into main Feb 21, 2025
33 checks passed
@JSerFeng JSerFeng deleted the fix/module-graph-change branch February 21, 2025 07:21
@h-a-n-a h-a-n-a mentioned this pull request Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants