I am afraid you will get similar results with VS2010. You might want to try with the Intel compiler for Windows.
Visual Studio 2010, Core i7 640M:
 - 32 bit: 1.50114 s - 0.495624 s
 - 64 bit: 1.04218 s - 0.496605 s

Il giorno 19 gennaio 2012 17:28, dariomt <dariomt@gmail.com> ha scritto:
Malcolm Reynolds <malcolm.reynolds <at> gmail.com> writes:

>
> On Wed, Jan 18, 2012 at 1:21 PM, Oswin Krause
> <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.

I'll try other flags in VS2008 or maybe upgrading to VS2010, but I'm tied to
windows and VS. I might try to send this case to VS support.

Many thanks!


_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: andrea.sansottera@gmail.com