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

Avoid potentially unnecessary string reallocs. #486

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

ttsugriy
Copy link
Contributor

@ttsugriy ttsugriy commented Aug 28, 2023

In case result is not created using a subset of the input result.reserve(input.size()) would result in increasing result's size with likely reallocation.

It's similar to #484

In case dest is not created using a subset of the `input` `result.reserve(input.size())`
would result in increasing `result`'s size with likely reallocation.
@anonrig anonrig requested a review from lemire August 28, 2023 17:43
Copy link
Member

@lemire lemire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@anonrig anonrig merged commit aeaec10 into ada-url:main Aug 28, 2023
28 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.

3 participants