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

Transition battery_t to return const pointers instead of copies where possible #1252

Open
brtietz opened this issue Dec 3, 2024 · 0 comments

Comments

@brtietz
Copy link
Collaborator

brtietz commented Dec 3, 2024

battery_t::get_params() returns a copy of the entire params object, which includes copying lifetime arrays. This can be a major user of memory and decreases runtime to do frequent copying.

At the moment, all functions in ssc have been migrated to call out for their specific data, but it may still be helpful to make this return a const pointer for increased speed/memory. There are some potential downstream headaches with battery_t's copy constructors to watch out for in this migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant