-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Use FastGaussQuadrature.jl for computation of Gauss quadrature nodes and weights? #180
Comments
Thanks for letting us know about this! I think you are right that we could wrap the FastGaussQuadrature routines in a function that shifts/scales the nodes and weights they supply to be on [a, b] I personally don't have the time to attack this right now, but if you are up for it I could try to offer some suggestions on where to start. Thanks again |
So I did a little bit of this in my own work just because I was trying to cut out dependencies. Here is what I did, if that helps get things rolling. Benchmark shows it is faster than QE for small n, but does slow down as n grows. I suspect somebody more experienced than I am could fix that.
|
Thanks @tbeason. Did you collect benchmark data? If so, would you mind sharing it. When I try to run it on
|
I can confirm that they are similar in performance (with a slight edge for
And it's not just the shifting/rescaling. The pure function is also not faster.
For Gauss-Legendre on the other hand, the difference is considerable
It might make sense to do a comprehensive benchmarking exercise of the QuantEcon vs. FaustGaussQuadrature routines. |
Glad someone confirmed that As for That being said, I would be open to seeing a new version of |
It seems that there is a considerable performance difference between, e.g.,
qnwlege()
from this package andgaussianlegendre()
from the FastGaussQuadrature package.The timings are from the second run of the code.
A caveat is that FastGaussianQuadrature doesn't allow for integrals over [a, b] but that could be dealt with.
The text was updated successfully, but these errors were encountered: