Performance improvement by passing vtkDataArray to vtkImplicitFunction
In the general case this does the check for Transform
once and avoids further branches by calling EvaluateFunction
directly. It also gives the option to specialize EvaluateFunction so that it can be further optimized and/or run in parallel. I tried this with vtkPlane
and the resulting performance improvement on a 12 core Mac Pro 5.1 with XCode 7.2 was substantial.
vtkPlane before: 1.51s after (serial): 0.32s (4.7x faster) after (tbb): 0.083s (18.2 x faster)