|Re: [eigen] Nesting by reference of by value ?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Nesting by reference of by value ?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 18 Nov 2009 12:45:54 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=TWRX/tXk+HCO2MAc6tvPFcMI0KR/3pASClBCqYamzN8=; b=mNHen4+jkQRQ9gDUYuQw4p9xerQcwqILRmAuWcAmQWBNRLighZId4DukB5UnCaiCAp LZcOl5zHwilM51OeoDCGmEU12sadar4nPZRk8ZwwRAP0Lh1s+GT6usFsGoaywWnkeHmY pGhOQKNrLkAehrU9b9Fa+Bh8Ngph1kbp7MVqg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=C5J3d53gbI5zIrAvIWlfSZqLOVDiVnhOFMhzphmlMxiKQNCbXYmRmsZ+l35QFgo/ZZ bD7+AS6Lgxc/hMRekr1NUmsXYPeGyFmo2H4opxOE1NEV1CsEwqKslBvDoDYCu4tiKZ0u 7r9wC+DAnOvWUafjCftmobXcTawraertDubcw=
2009/11/18 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
> I've just played a bit with Hauke's nesting refactoring fork
> Let me recall that currently expressions are nested by reference that
> enforces the use NestByValue when a function has to return a nested
> expression. See for instance adjoint() which returns
> Transpose<NestByValue<CwiseUnaryOp<ei_scalar_conjugate<Scalar>, Derived> >
>>. As you can see this is pretty annoying. In Hauke's fork lightweight
> expressions (i.e., all but Matrix) are automatically nested by value. So
> need for the NestByValue workaround.
> So now the question is what about the performances ? Well I tried a very
> simple example:
> Vector4f a, b, c, d;
> c = a+b+c+d;
> and here are the respective assembly codes generated by g++ 4.3.3
That wouldn't be the first time that g++ 4.3 is stupid, right?
It would be interesting to see g++ 4.4.