-
Notifications
You must be signed in to change notification settings - Fork 138
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
General optimisation #477
base: master
Are you sure you want to change the base?
General optimisation #477
Conversation
Looks good to me. Have you done any performance testing to see how much of a performance gain? |
Its a grain of salt in the all process but it reduce allocation so its never bad :) |
I believe it's more than a grain of salt. String copy overhead (and string hash in something like map<std::string, ...>) is really terrible based on my performance test. But most of them can be optimized with a better coding approach. I just feel that any modification should have a clear benefit, not just that way it looks good. Modification is always risky, and if there is no exact benefit, it should not be touched. |
I mean based on the sources size of the module its a small amont of required changes, you cant test optimisation with only small amount of changes like this on few strings. Its a long process as containers need to be changed to use also refs and views. Small commit by small commit |
We are not talking about the same thing. You don't need to optimize everything, no. You only need to optimize the critical part, in other words performance bottleneck. If you don't even know where the bottleneck is, figure it out first. |
Replaced alot of std::string copy by string_view and function prototype with references.
Rework helpers with modern c++ 20