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

inefficent string concatination #22

Open
jonesmz opened this issue Jun 6, 2020 · 0 comments
Open

inefficent string concatination #22

jonesmz opened this issue Jun 6, 2020 · 0 comments
Labels
code-improvement Improvements to the code base which don't change the game good first issue Good for newcomers

Comments

@jonesmz
Copy link
Member

jonesmz commented Jun 6, 2020

const std::string fix_key = "_IKEY";
auto n_parse = SerializeUtil::load_string(fix_key + "=" + value);
  1. change fix_key to std::string_view, or "static constexpr auto[]"
  2. Concatinating strings like this is expensive. Take a look here: https://github.com/splinter-build/splinter/blob/15-default-values/src/string_concat.h
@tatjam tatjam added code-improvement Improvements to the code base which don't change the game good first issue Good for newcomers labels Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-improvement Improvements to the code base which don't change the game good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants