-
Notifications
You must be signed in to change notification settings - Fork 105
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
Make prefiltering faster #33
Conversation
I should add that this makes the prefiltering in Interpolations faster than Grid, too. Grid was a bit faster than Interplations master, but not by much; in a 2d case, I got 0.19 s for master Interpolations, .17 s for Grid, and 0.12 for this PR. |
Note mostly to self: Grid seems to be able to do without Woodbury in a few more cases than Interpolations. Try to figure out why (important since it has a big performance impact). |
85106f9
to
0a66c1a
Compare
This implements linear and quadratic interpolation, and constant extrapolation. The test suite is still in need of some love...
This isn't a huge improvement, but in my tests it allocates about seven-fold less memory and runs in approximately 60% of the time of the original. The improvement is much more dramatic for cases where it doesn't have to use Woodbury, in which case it can be more than 5x faster. This also turns off pivoting to improve the cache behavior.
12f45a5
to
0cd0b3b
Compare
As an update, once JuliaLang/METADATA.jl#2670 merges, I will be able to contribute a further improvement in the Woodbury prefiltering. |
This PR (which includes #32) makes prefiltering somewhat faster. In many cases the improvement is a bit disappointing, but when Woodbury can be avoided it's quite dramatic.
With current master (well, really with #32, so the deprecations don't slow things down):
With this PR:
It also allocates a lot less memory. With the new GC this isn't a huge issue, but neither is it a bad thing. It might lead to even greater benefits for smaller arrays.