Skip to content

Conversation

0xsot
Copy link
Contributor

@0xsot 0xsot commented Jul 8, 2025

Describe your changes

Replaced Vec::new() with Vec::with_capacity() in places where the final collection size is known or can be reasonably estimated to reduce memory allocations by pre-allocating the correct capacity instead of growing the vector incrementally

Issue ticket number and link

Checklist before requesting a review

  • I have added guiding text to explain how a reviewer should test these changes.

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    Performance optimization only - no changes to consensus logic or data structures

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.

1 participant