-
Notifications
You must be signed in to change notification settings - Fork 6
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
Skip slow calculation of reference C6 #39
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
- Coverage 99.48% 99.48% -0.01%
==========================================
Files 20 20
Lines 391 390 -1
Branches 43 44 +1
==========================================
- Hits 389 388 -1
Misses 1 1
Partials 1 1 ☔ View full report in Codecov by Sentry. |
1b95206
to
5256f06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also replace the npy file with the one that is already unpacked from the composite indices rather than storing a packed and an unpacked Version in two different files next to each other.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The loops in the
_load_c6
function are actually really slow and create a bottleneck for the whole calculation. Since the output of this function is not dependent on the system, we only use it to store the tensor (".pt" file) and now skip the calculation and directly load the tensor from the "reference-c6.pt" file.This gives a speed-up of more than one order of magnitude for small systems.