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

Optimize data structures to reduce memory footprint #125

Open
erlingrj opened this issue Nov 9, 2022 · 1 comment
Open

Optimize data structures to reduce memory footprint #125

erlingrj opened this issue Nov 9, 2022 · 1 comment
Labels
enhancement Enhancement of existing feature

Comments

@erlingrj
Copy link
Collaborator

erlingrj commented Nov 9, 2022

Had a discussion with Edward on this and three strategies came up:

  1. More hiding of modal and federated-specific fields behind macros. E.g. reaction_t has three fields related to STP.
  2. Use C-style inheritance to distinguish between Actions, Timers, Input Ports and Physical actions. Each child-struct would only have the fields they need
  3. Merge booean fields and other flags into a int flags supply macros for getting the desired fields
@erlingrj erlingrj added the enhancement Enhancement of existing feature label Nov 9, 2022
@erlingrj
Copy link
Collaborator Author

Have applied (1) in the NGRES branch and reduced memory footprint per Reaction from 104B to 80B as well as Saving 8B in Ports, Actions and Timers

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

No branches or pull requests

1 participant