I want to evaluate a 2D interpolating function many times in a finite interval. What is the fastest way to do that?
I imagine that its possible to specify a discrete grid and memoize the function on this grid. Afterwards round any input value to values on this grid and call the memoized function. But I am not sure if this is the most convenient and fastest way to do.
fInt=Interpolation[...,InterpolationOrder->0]
first, which is basically what you're describing. If that's not fast enough you can try to build your own version, but that might not be worth the effort. $\endgroup$ – N.J.Evans Nov 29 '17 at 15:17Listable
functions first, because they are vectorized. Next tryMap
ping your functions, and last tryParallelTable
to parallelise over cores. $\endgroup$ – Thies Heidecke Nov 29 '17 at 15:17