[Insight-developers] Iterator vs IteratorWithIndex
Stephen R. Aylward
aylward@unc.edu
Sun, 11 May 2003 15:20:48 -0400
To make a more realistic test, I merely converted one of our image
intensity windowing filters to use IteratorWithIndex instead of
Iterator. This way the cost of the index can be considered with respect
to the cost of simple addition and multiplication at every pixel...
Iterator for intensity windowing (secs)
Single Processor: 5.7
Dual Processor: 3.6
IteratorWithIndex for intensity windowing (secs)
Single Processor: 6.4
Dual Processor: 4.1
So - in the "grand scheme of things" using IteratorWithIndex is only
about 12% slower.
Percent change calculated as (6.4-5.7)/5.7 * 100
Stephen
--
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695