Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

perf: avoid deep string copy #213

Merged
merged 1 commit into from
Dec 6, 2023
Merged

perf: avoid deep string copy #213

merged 1 commit into from
Dec 6, 2023

Conversation

anonrig
Copy link
Contributor

@anonrig anonrig commented Dec 4, 2023

std::string(char*) makes a deep copy of the string, but string.h provides us with strcmp C function to have equality checks between 2 different char pointers.

@anonrig anonrig requested a review from JonasBa December 4, 2023 21:29
Copy link
Member

@JonasBa JonasBa left a comment

Choose a reason for hiding this comment

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

Thank you 🤝

@JonasBa JonasBa merged commit 9608242 into main Dec 6, 2023
12 of 13 checks passed
@JonasBa JonasBa deleted the avoid-deep-copy branch December 6, 2023 13:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants