[vtk-developers] vtkDataArrayTemplate

Benjamin Schindler bschindler at student.ethz.ch
Mon Nov 24 05:14:19 EST 2008


Hi

I noticed that my code ran very slow so I did some profiling and I 
noticed to my horror, that about 50% of all time is spent inside the 
GetTuple (and it's wrappers). Looking at the code I noticed that for 
every access a copy of a tuple is generated which is pretty insane when 
all you want is a distance to another point...
I do realize that in vtk, you never know whether you work with floats or 
doubles or ints etc, but I'm sure there are other ways that are not this 
hard on performance

Are there plans on improving this? I've looked at a few ideas and my 
interest was caught by Eigen2, a very fast Math Library making extensive 
use of templates challenging even the mkl in terms of speed. They make 
heavy use of template expressions so there are no intermediate copies at 
any point. I'd guess something like this would be very much doable for vtk

Even though it would be quite some work, I imagine all of vtk would gain 
significantly from this - in terms of genericity, design and performance

Any comments?

Cheers
Benjamin



More information about the vtk-developers mailing list