Thanks for the research. I also did some testing with the original code and 
to me it seems like the problem has nothing to do with the interpolation 
method but with the memory allocation. Matlab is just faster because it 
doesn't reallocate memory in every iteration, as you said. It also explains 
my timings I guess. Matlab with 1 iteration, relatively slow but once it's 
looped, it doesn't reallocate memory. So I am going to look into the 
@inbounds and so on. I am pretty confident that the spl is faster than 
Matlabs interp1. 


Reply via email to