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

Cuberoot: Apply first iteration explicitly #11

Merged

Conversation

marshallward
Copy link

Applying the first iteration explicitly appears to speed up the cuberoot function by a bit over 20%:

Before:
Halley Final: 0.14174999999999999

After:
Halley Final: 0.11080000000000001

There is an assumption that compilers will precompute the constants like 0.7 * (0.7)**3, and that all will do so in the same manner.

Applying the first iteration explicitly appears to speed up the cuberoot
function by a bit over 20%:

 Before:
 Halley Final:  0.14174999999999999

 After:
 Halley Final:  0.11080000000000001

There is an assumption that compilers will precompute the constants like
`0.7 * (0.7)**3`, and that all will do so in the same manner.
@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4afaf21) 42.97% compared to head (aa09cc7) 37.19%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           Halley_cuberoot      #11      +/-   ##
===================================================
- Coverage            42.97%   37.19%   -5.79%     
===================================================
  Files                   41      271     +230     
  Lines                 5028    80346   +75318     
  Branches               953    14982   +14029     
===================================================
+ Hits                  2161    29888   +27727     
- Misses                2684    44902   +42218     
- Partials               183     5556    +5373     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hallberg-NOAA Hallberg-NOAA merged commit d670263 into Hallberg-NOAA:Halley_cuberoot Jan 26, 2024
12 checks passed
marshallward added a commit that referenced this pull request Jan 26, 2024
Applying the first iteration explicitly appears to speed up the cuberoot
function by a bit over 20%:

 Before:
 Halley Final:  0.14174999999999999

 After:
 Halley Final:  0.11080000000000001

There is an assumption that compilers will precompute the constants like
`0.7 * (0.7)**3`, and that all will do so in the same manner.
@marshallward marshallward deleted the Halley_cuberoot_init branch May 8, 2024 14:59
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.

3 participants