> <Oswin.Krause <at>
ruhr-uni-bochum.de> wrote:
> > Hi,
> >
> > I can't measure any time differences. both take 0.56s.
> > GCC 4.6.2 used here with "-O3" as optimisation option.
> >
>
> I think sufficiently smart compilers can convert the code to use a
> single index. GCC 4.2 (still the default compiler for OS X 10.6) is
> unable to optimise this properly even with -O3, so I also see roughly
> a factor of three difference in runtime.. However using LLVM-clang the
> pointer and indexed versions perform the same.
>
It's good to hear that a good optimizer is able to do the right thing.