Initial work done by Bradley Lowencamp.

http://review.source.kitware.com/#/c/6570/

This patch is passing all the regression tests.  I would welcome people
trying the patch out on their real-world code and desk-check it to see if
I missed something.

A completely unscientific benchmark -- the total time running ctest for
ITK -- shows a modest improvement in execution time; I suspect that the
actual speedup is better than this; I ran all tests instead of just
running tests that would be affected by removing the inner loop callbacks
to GetInput and GetOutput

Without Patch:
Total Test time (real) = 652.27 sec
2040.613u 168.422s 10:52.58 338.5%      0+0k 30+1724io 16130pf+0w


With Patch
Total Test time (real) = 634.32 sec
1874.695u 165.739s 10:34.64 321.5%      0+0k 0+1744io 1355pf+0w

In general, it would be better to call GetInput or GetOutput once in a
function rather than calling it over and over again, as is often the case,
but I decided that it wasn't worth the effort -- and the risk accidentally
break something -- of fixing everyplace I saw code that did this.  But
developers should keep in mind that these methods are not free, and
program accordingly.

--
Kent Williams [email protected]






________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
________________________________
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to