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

Updated double precision constant divisions in helix.cpp #1207

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

Arpan3323
Copy link
Contributor

Hi, I noticed some double precision constant divisions in helix.cpp and saw room for potential efficiency improvement as divisions are generally more expensive.

What is changed?

  • Updated multiple occurrences of division by a constant double to multiplication by a constant double
  • The updates are of this nature: some_double_precision_number / 2. to some_double_precision_number * 0.5

Remarks

I think compilers might optimize most of these divisions anyways for optimized builds. Feel free to close this pull request if these updates are not desired. Let me know if you have any questions or suggestions.

@biochem-fan
Copy link
Member

Thanks. Probably the speed difference in practice is almost zero but I merged this anyway.

@biochem-fan biochem-fan merged commit abd9284 into 3dem:ver5.0 Nov 24, 2024
0 of 4 checks passed
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