Re: [eigen] need help optimizing with __restrict__ and such

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

You're saving my day! I'd give you, like, 1 ton of peanuts if you were here!

I am using gcc 4.1, which is why I got so poor performance with eigen2.

So I'll upgrade to gcc 4.2 and consider the speed issues solved. I'm not going 
to spend more time working around optimizer issues in "old" versions of gcc. 
For "old" compilers, it is already good enough if it compiles without 
warnings.

As to the regression in gcc 4.3, nothing to worry about, as gcc 4.3 is still 
far from release AFAIK

I have no idea what happened between gcc 4.1 and 4.2.

Eigen2 has good reasons to be faster than tvmet, as it produces simpler 
expression trees (thanks to a curiously recurring template pattern the trees 
have lower depth; and thanks to having less redundant template parameters, 
the trees have fewer leaves). Also "valgrind --tool=callgrind" showed lower 
figures for eigen2 than for tvmet. So the better performance of eigen2, that 
you measured with g++ 4.2, seems logical.

Cheers,
Benoit

On Saturday 29 September 2007 18:38:42 Michael Olbrich wrote:
> Hi,
>
> what gcc version are you using? It makes a big difference here:
>
> ./a
> g++-4.1: 5s
> g++-4.2: 5s
> g++-4.3: 6s
>
> ./b
> g++-4.1: 21s
> g++-4.2: 4s
> g++-4.3: 15s (8s with -fforce-addr)
>
> g++-4.1 (GCC) 4.1.3 20070831 (prerelease) (Debian 4.1.2-16)
> g++-4.2 (GCC) 4.2.1 (Debian 4.2.1-5)
> g++-4.3 (Debian 4.3-20070902-1) 4.3.0 20070902 (experimental) [trunk
> revision 128028]
>
> I have no idea though what's the reason for this big difference.
>
> michael


Attachment: signature.asc
Description: This is a digitally signed message part.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/