Description
Hi @jglaser!
Thanks so much for sharing this, awesome! I am looking for faster solutions myself. I tried with numba, and failed, and I tried your approach, and it is not faster either.
I think you have to be careful when stating
A faster 3D interpolation to replace scipy.interpolate.RegularGridInterpolator()
In your example you have a massive grid, and in this you interpolate one point. In this case it is indeed possible to achieve faster versions than the SciPy version, as SciPy has some overhead to set it up.
However, instead of your example:
x0, y0, z0 = (1.1,0.25, 7.5)
how about if I want to interpolate not one point, but for an even denser grid, hence
x0 = np.linspace(0,2.5,200)
y0 = np.linspace(-1,.5,100)
z0 = np.linspace(5,25,250)
X0, Y0, Z0 = np.meshgrid(x0, y0, z0, indexing='ij')
In SciPy I can do
interp_si((X0, Y0, Z0))
But your function only accepts size-1 arrays, so I have to loop over it which will be much slower for five million points.
It is not really an issue, I was just interested in your opinion as you worked on improving/speeding-up RegularGridInterpolator
.