Skip to content

Improve vtkTupleInterpolator speed

Improve vtkTupleInterpolator speed:

1- Improve the initialization of the interpolator when there is a lot of data. Currently, the only way to fill the interpolator is to give it the data one by one. Hence, for each point added, the interpolator add the point and then compute a sort. When we fill the interpolator with a lot of data (40K-50K) the filling can take take a long time. Now, one can fill the interpolator with all the data in one time and then, only computing one sort.

2- Improve the speed of the lookup of datapoints. Currently, when we want an interpolation at the time T, the interpolator is a linear search until it finds the two times T0 and T1 such as T0 < T < T1. When the entered data is near the end of the list, the scan can take a long time. Now, we can decide to do a binary search so that the complexity is log(N) instead of N. That is now the default method.

Edited by Bastien Jacquet

Merge request reports