> > It seems like
the trend in image
> > processing is
to avoid using indexes in the inner loop if at all possible.
> Which is a non
sensical way of doing stuff cause code using pointer arithmetic and
"leet" stuff like *(ptr++ + x*width) makes code hard to decipher and > to parallelize afterward.
> I wish you a good
deal of fun to block a pointer based IP code into SMP or SIMD :/
> It's preferable to
stick to indexes as it works fine on both side (parallelization and
performances).
But with a index you need
two variables, the base pointer + index. And unless your compiler + instruction
set allows you to addess a memory location using a base pointer + index then
you are going to loose much in performance. IMHO a pointer is always faster, it
let you write the algorithm in a different way avoiding probably the example
you gave above.