[vtk-developers] vtkTimeStamp efficiency

David Gobbi dgobbi at irus.rri.ca
Sat Oct 6 23:30:06 EDT 2001


Hi all,

I've been looking through the Windows SDK docs, and it looks like
vtkTimeStamp could be made significantly more efficient on Win32.

There is a Win32 API function called "long InterlockedIncrement(long *)"
that does specifically what we need, but is reportedly over 100X
faster than the worst-case of the EnterCriticalSection() call that
is currently done.

The efficiency could also be improved by moving the body of
vtkTimeStamp::Modified() into the .h file and making it an
inline function.

Any objections to either of these changes?

 - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario




More information about the vtk-developers mailing list