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

OuNion OrdVectoru merge inplace #296

Open
kilohsakul opened this issue Aug 11, 2023 · 0 comments
Open

OuNion OrdVectoru merge inplace #296

kilohsakul opened this issue Aug 11, 2023 · 0 comments

Comments

@kilohsakul
Copy link
Collaborator

kilohsakul commented Aug 11, 2023

Hm, doing this with the two input vectors only does not seem so easy.

Instead, this is maybe a place where a static reusable data structure would makse sense.
Merge the two into a static third vector, and then coppy the third vector to, say, lhs vector.
This only requires to sometimes resize the lhs.

Btw, if the underlying data struct was a dequeue, then one could just concatenate the lhs and rhs and coppy the merged data there, no allocation would be needed.
Maybe we could try sometime what this does.

@VeriFIT VeriFIT deleted a comment from kilohsakul Aug 24, 2023
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

No branches or pull requests

1 participant