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

Rename _default_method and absorb _gausslegendre #147

Merged
merged 19 commits into from
Dec 3, 2024
Merged

Rename _default_method and absorb _gausslegendre #147

merged 19 commits into from
Dec 3, 2024

Conversation

mikeingold
Copy link
Collaborator

@mikeingold mikeingold commented Dec 2, 2024

Changes

  • Renames _default_method to _default_diff_method (Changes to _default_method #146)
  • Absorbed _gausslegendre into only remaining GaussLegendre integral method
    • This change improved performance up to about 30% for GaussLegendre integrals.
  • Reorganized utils.jl functions and added docstrings

@JoshuaLampert JoshuaLampert linked an issue Dec 2, 2024 that may be closed by this pull request
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ce99b3e) to head (045a082).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #147   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          167       166    -1     
=========================================
- Hits           167       166    -1     

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

Copy link
Contributor

github-actions bot commented Dec 2, 2024

Benchmark Results

main 045a082... main/045a082ea4dba5...
Differentials/Differential 0.24 ± 0.002 μs 0.24 ± 0.0019 μs 1
Differentials/Jacobian 0.206 ± 0.001 μs 0.205 ± 0.001 μs 1
Integrals/Segment/Scalar GaussKronrod 1.19 ± 0.005 μs 1.19 ± 0.006 μs 0.999
Integrals/Segment/Scalar GaussLegendre 8.58 ± 0.19 μs 6.89 ± 0.14 μs 1.24
Integrals/Segment/Scalar HAdaptiveCubature 1.45 ± 0.15 μs 1.44 ± 0.15 μs 1
Integrals/Segment/Vector GaussKronrod 3.38 ± 0.065 μs 3.45 ± 0.066 μs 0.982
Integrals/Segment/Vector GaussLegendre 24.6 ± 0.59 μs 22.8 ± 0.58 μs 1.08
Integrals/Segment/Vector HAdaptiveCubature 4.38 ± 0.083 μs 4.32 ± 0.089 μs 1.01
Integrals/Sphere/Scalar GaussKronrod 0.0821 ± 0.002 ms 0.0819 ± 0.002 ms 1
Integrals/Sphere/Scalar GaussLegendre 2.26 ± 0.0092 ms 2.26 ± 0.0093 ms 1
Integrals/Sphere/Scalar HAdaptiveCubature 0.0582 ± 0.0001 ms 0.0582 ± 0.00013 ms 1
Integrals/Sphere/Vector GaussKronrod 0.116 ± 0.00098 ms 0.115 ± 0.00091 ms 1
Integrals/Sphere/Vector GaussLegendre 3.6 ± 0.067 ms 3.62 ± 0.064 ms 0.993
Integrals/Sphere/Vector HAdaptiveCubature 0.109 ± 0.0014 ms 0.108 ± 0.0011 ms 1
Specializations/Scalar GaussLegendre/BezierCurve 0.251 ± 0.00067 ms 0.251 ± 0.003 ms 0.999
Specializations/Scalar GaussLegendre/Line 12.9 ± 0.39 μs 10.8 ± 0.55 μs 1.2
Specializations/Scalar GaussLegendre/Plane 0.902 ± 0.0066 ms 0.902 ± 0.01 ms 1
Specializations/Scalar GaussLegendre/Ray 12.5 ± 3 μs 10.4 ± 0.41 μs 1.2
Specializations/Scalar GaussLegendre/Tetrahedron 0.282 ± 0.0027 s 0.284 ± 0.0018 s 0.991
Specializations/Scalar GaussLegendre/Triangle 0.876 ± 0.044 ms 0.731 ± 0.0067 ms 1.2
time_to_load 1.49 ± 0.0034 s 1.5 ± 0.0035 s 0.995

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

src/integral.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
test/utils.jl Outdated Show resolved Hide resolved
mikeingold and others added 2 commits December 3, 2024 09:52
Co-authored-by: Joshua Lampert <[email protected]>
Co-authored-by: Joshua Lampert <[email protected]>
@mikeingold mikeingold marked this pull request as ready for review December 3, 2024 15:52
Copy link
Member

@JoshuaLampert JoshuaLampert left a comment

Choose a reason for hiding this comment

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

Thanks.

@mikeingold mikeingold merged commit 3c06d76 into main Dec 3, 2024
12 checks passed
@mikeingold mikeingold deleted the defdiff branch December 3, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes to _default_method
2 participants