Skip to content

Comments

opt: optimize precompile extend()#3192

Merged
rakita merged 1 commit intobluealloy:mainfrom
jackwener:pre_alloc
Dec 2, 2025
Merged

opt: optimize precompile extend()#3192
rakita merged 1 commit intobluealloy:mainfrom
jackwener:pre_alloc

Conversation

@jackwener
Copy link
Contributor

  • Eliminated the unnecessary Vec allocation (collect::<Vec<_>>)
  • avoiding an extra clone() p.clone()
  • pre-allocation: Added reserve calls based on size_hint

- Eliminated the unnecessary Vec allocation (collect::<Vec<_>>)
- avoiding an extra clone() `p.clone()`
- pre-allocation: Added reserve calls based on size_hint
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 26, 2025

CodSpeed Performance Report

Merging #3192 will not alter performance

Comparing jackwener:pre_alloc (92b6796) with main (77abd37)

Summary

✅ 173 untouched

@rakita rakita merged commit a26666c into bluealloy:main Dec 2, 2025
31 checks passed
@github-actions github-actions bot mentioned this pull request Nov 26, 2025
@jackwener jackwener deleted the pre_alloc branch December 2, 2025 11:16
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