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

Code optimizations reported by static code analysis (2018-11-05) #26548

Merged
merged 15 commits into from
Nov 7, 2018

Conversation

ZhilkinSerg
Copy link
Contributor

Summary

SUMMARY: Performance "Code optimizations reported by static code analysis"

Purpose of change

Cleanup code while increase performance.

Describe the solution

See commit messages.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Nov 5, 2018
units::mass carry_mass,
units::volume carry_volume )
int talk_function::om_carry_weight_to_trips( const units::mass &mass, const units::volume &volume,
const units::mass &carry_mass, const units::volume &carry_volume )
Copy link
Contributor

Choose a reason for hiding this comment

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

Passing units types by const reference rather than value is likely going to be a pessimization. From the ABI perspective they're effectively ints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. I've rolled back these changes.

@kevingranade kevingranade merged commit 129cc5e into CleverRaven:master Nov 7, 2018
@ZhilkinSerg ZhilkinSerg deleted the sa-2018-11-05 branch November 8, 2018 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants