Boost logo

Ublas :

Subject: Re: [ublas] Overhead of matrix indexing
From: Malcolm Reynolds (malcolm.reynolds_at_[hidden])
Date: 2012-01-18 08:31:14


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

If you are tied to VS then I guess you are limited in options, but if
not it may be worth seeing what the windows support for LLVM is like.

Malcolm