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

Performance of finding rational approximations #9

Open
oscardssmith opened this issue Jan 24, 2021 · 1 comment
Open

Performance of finding rational approximations #9

oscardssmith opened this issue Jan 24, 2021 · 1 comment

Comments

@oscardssmith
Copy link

I have been trying to find some rational approximations, but I am running into cases where ratfn_minimax is not halting in a reasonable amount of time.

As a reduced example, computing a pade approximation with a quintic numerator and denominator only takes .8 seconds, but with 6th degree coefficients, it takes almost a minute.

julia> @time ratfn_minimax(exp, (1,5), 5, 5, (x,y)->exp(-x*x));
  0.826685 seconds (4.99 M allocations: 271.503 MiB, 2.91% gc time, 55.26% compilation time)

julia> @time ratfn_minimax(exp, (1,5), 6, 6, (x,y)->exp(-x*x));
 56.748839 seconds (763.57 M allocations: 39.364 GiB, 3.67% gc time, 0.82% compilation time)

For my real use-case, I want an 8,8 approximation. Is there any specific reason why this should get so much slower as you ask for a higher degree approximation?

@oscardssmith
Copy link
Author

Attached is a profile of the 60 second one. It seems like most of the time is in poly_eval. Is there a reason to not replace it's use with evalpoly? It seems like it might just be a worse version. Am I missing something?
remez.jlprof.zip

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

No branches or pull requests

1 participant