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

Remove large initialised arrays #87

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

ronandoherty1
Copy link
Contributor

tmp_bt is a large array initialised in the current develop branch and only a small number of its entries are used. When we skip initialisation and only define the entries that are needed for the program to run, the total memory usage of ndlar_flow goes from 4.7 GB to 4.0 GB. The outputs are identical, as determined by MD5sum. Memray flamegraphs for the programs run before and after the change can be seen below.
memray-before
memray-after

Copy link
Member

@krwood krwood left a comment

Choose a reason for hiding this comment

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

Looks good. Nice find @ronandoherty1

@krwood krwood merged commit 76b410e into DUNE:develop Dec 11, 2023
2 checks passed
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants