JuliaMath / QuadGK.jl

adaptive 1d numerical Gauss–Kronrod integration in Julia
MIT License
268 stars 37 forks source link

speedup gauss for symmetric rules #113

Closed stevengj closed 1 month ago

stevengj commented 1 month ago

For symmetric rules (corresponding to a HollowSymTridiagonal Jacobi matrix), we can speed up gauss by only doing Newton refinement and eigenvector calculation for half of the points, since the other half are the mirror image.

This gives a 2x speedup for BigFloat gauss rules, where these steps dominate. It doesn't seem to make much difference for Float64 gauss rules, which are probably dominated by the LAPACK eigvals call.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.43%. Comparing base (62eabae) to head (be4e746).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #113 +/- ## ========================================== - Coverage 98.55% 98.43% -0.13% ========================================== Files 7 7 Lines 694 703 +9 ========================================== + Hits 684 692 +8 - Misses 10 11 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.