Skip to content

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