Closed TSGut closed 1 year ago
This is what I get now for your example
julia> using SemiclassicalOrthogonalPolynomials, ClassicalOrthogonalPolynomials
julia> t = 1.1
1.1
julia> Q₀₀ = SemiclassicalJacobi.(t, 0, 0, 0:∞);
julia> Q₁₁ = SemiclassicalJacobi.(t, 1, 1, 0:∞);
julia> L = (Weighted.(Q₀₀) .\ Weighted.(Q₁₁));
julia> @time LL = L[1:70];
4.524202 seconds (45.49 M allocations: 1.567 GiB, 6.03% gc time)
Looks a lot better to me, though I am sure more could be done.
Patch coverage: 100.00%
and no project coverage change.
Comparison is base (
60fe828
) 91.82% compared to head (e4aa8f0
) 91.82%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It definitely performs much better and good enough for the examples I wanted to produce for now! In the long run I might need a rethink but that's the future's problem. Thanks a million!!
Could do a regression test on LazyArrays.jl to find out what caused the slowdown
I think we can merge this? It's a small change with big performance improvements and no real drawbacks that I can see
@ioannisPApapadopoulos It's not quite as clean as a direct formula but it's very close (actually I guess it is a direct formula in terms of a ratio of two 2F1s...)!
This should still speed things up significantly (if I haven't made a mistake in the maths ofc). Can you give it a try and let me know if further speed ups are necessary and also if the results look correct? It passes tests and my sanity checks at least.