Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move removeIndex's result instead of copying #1516

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

jedav
Copy link
Contributor

@jedav jedav commented Oct 18, 2023

Currently removeIndex copies the removed value into removed and then destructs the original, which can cause significant performance costs when removing a large tree by index. This change causes removeIndex to std::move the removed value into removed instead, avoiding this copy and destruction overhead. removeMember already moves its result in this way.

jedav and others added 2 commits October 18, 2023 10:59
Currently removeIndex copies the removed value into removed and then
destructs the original, which can cause significant performance overhead.
@baylesj baylesj merged commit fdb529b into open-source-parsers:master Sep 10, 2024
10 checks passed
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