[vtk-developers] vtkDepthSortPolyData modernization

Burlen Loring burlen.loring at gmail.com
Wed Nov 11 12:04:37 EST 2015


Hi All,

Would anyone be willing to review this patch?
https://gitlab.kitware.com/vtk/vtk/merge_requests/844

I was profiling VisIt and noticed that vtkDepthSortPolyData (in spite of 
its limitations it is used by VisIt for transparent rendering) made use 
of qsort and about 1/2 the time was spent by qsort. std::sort is known 
to be faster because of the possibility of the compiler to inline the 
comparisons. Updating qsort to std::sort seemed like an easy way to make 
it faster. As I worked the profiler pointed out a number of other fairly 
easy things to improve and overall the class is now ~3x faster for two 
of the modes and ~2x faster for the other. I enumerated the changes in 
the commit message and have added a cxx test to improve the test coverage.

If you have the time, please take a look, and let me know if you have 
any feedback on it.

Thanks
Burlen




More information about the vtk-developers mailing list