-
Notifications
You must be signed in to change notification settings - Fork 56
[TopicUtils] Optimize MangleName(), DemangleName() and MangleType() #788
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
Conversation
Signed-off-by: Carlos Agüero <[email protected]>
|
@Mergifyio backport gz-transport15 gz-transport14 gz-transport13 ign-transport11 |
✅ Backports have been createdDetails
Cherry-pick of 18734a4 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Cherry-pick of 18734a4 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Cherry-pick of 18734a4 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
…788) Signed-off-by: Carlos Agüero <[email protected]> (cherry picked from commit 18734a4)
…788) Signed-off-by: Carlos Agüero <[email protected]> (cherry picked from commit 18734a4) # Conflicts: # src/TopicUtils.cc
…788) Signed-off-by: Carlos Agüero <[email protected]> (cherry picked from commit 18734a4) # Conflicts: # src/TopicUtils.cc
…788) Signed-off-by: Carlos Agüero <[email protected]> (cherry picked from commit 18734a4) # Conflicts: # src/TopicUtils.cc
…788) (#790) (cherry picked from commit 18734a4) Signed-off-by: Carlos Agüero <[email protected]> Co-authored-by: Carlos Agüero <[email protected]>
🦟 Bug fix
Continuing the improvements in
TopicUtils, this patch optimizesMangleName(),DemangleName()andMangleType().It replaces character-by-character string building with
std::replaceand adds a missing const reference to avoid copying each string.The benchmarks show that the new functions (the ones with the
2suffix improve the original ones).Summary
Checklist
codecheckpassed (See contributing)Generated-by: Remove this if GenAI was not used.
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.