Boost logo

Ublas :

Subject: Re: [ublas] Overhead of matrix indexing
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2012-01-18 08:21:51


Hi,

I can't measure any time differences. both take 0.56s.
GCC 4.6.2 used here with "-O3" as optimisation option.

Greetings,
Oswin

> Malcolm Reynolds <malcolm.reynolds <at> gmail.com> writes:
>
>>
>> On Tue, Jan 17, 2012 at 6:39 PM, <dariomt <at> gmail.com> wrote:
>> > Any hints? Ideas?
>> > I've compiled with all possible optimizations I could think of, but
>> pointers
>> > always beat matrix indexing.
>>
>> I don't know if this will help at all, but have you tried iterators as
>> a third option? I'd be intrigued to see the relative timings also (ie
>> are pointers 20% faster, or an order of magnitude faster..)
>>
>
> Compiled with VS2008
> cl /O2 /Ob2 /Oi /Ot /Oy /I "C:\ThirdPartyLibs\boost\1_42_0" /D "WIN32" /FD
> /EHa
> /MD /GS- /W3 /TP ..\main_2.cpp /Fetest.exe
>
> Measuring runtime with cygwin
> $ time ./test.exe
>
> real 0m2.202s
> user 0m0.015s
> sys 0m0.031s
>
> $ time ./test.exe xx
>
> real 0m0.592s
> user 0m0.015s
> sys 0m0.030s
>
> That's more than 3 times faster for this case.
>
> I'll try iterators and post results.
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: Oswin.Krause_at_[hidden]
>