Skip to content

Optimize vector copying#537

Merged
ZigRazor merged 1 commit intoZigRazor:masterfrom
vil02:optimise_vector_copy_in_CoordinatedPartitionState
Oct 1, 2025
Merged

Optimize vector copying#537
ZigRazor merged 1 commit intoZigRazor:masterfrom
vil02:optimise_vector_copy_in_CoordinatedPartitionState

Conversation

@vil02
Copy link
Copy Markdown
Contributor

@vil02 vil02 commented Sep 30, 2025

The original code would benefit from using std::vector::reserve:
https://quick-bench.com/q/0q-Yv5fPGR9klsTil2_qOkUVyCk
(cf. performance-inefficient-vector-operation).

However that might be simplified to call of the copy constructor of std::vector (which uses the reserve-optimization). This is exactly this change.

@vil02 vil02 marked this pull request as ready for review September 30, 2025 22:20
@ZigRazor ZigRazor merged commit 27a26ed into ZigRazor:master Oct 1, 2025
10 of 17 checks passed
@vil02 vil02 deleted the optimise_vector_copy_in_CoordinatedPartitionState branch October 1, 2025 09:21
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