[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] nesting
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Thu, 4 Feb 2010 14:35:43 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=/DwIDX4RxXsP9w/FAoHBip6BuIbiXHjWrON6WfLpraY=; b=wkNffPeXl6YRgZRAr7bGOvRX56A8EMlw5Erz8idIEkUmAP+avUxdeyAefWdQJX+AJA unxITM4pPHwqH4lyNJVSRf815Iv3aYxobOhE+DMnIgHD6FuRBIJUj7y0F8c87HLrmeUm VmnKd+QGItDxES1EggLNovtVUfU2v1j6NCML0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=LnUiMmG5qGajMLDmkjUCpjZpE9t0y8ZrC9SNiT7FmqKeMoPMcbmW+Fclz8VX4RMKF3 TYdyZM+bcqLNigJSz2VzJTTn4UrcKG0OgY+iiGPMOhVt3RIOC6Aw8JYPYQjHreC9qo1F Z+AclkEjC+o5+XzJi3Nm4KV1rwAQl+09pFTuo=
While looking into the "performance degradation" issue from the forum
I found out that it is due to temporaries - as Benoit already guessed.
I am a little bit afraid, that what I once proposed, namely copying
expressions by value, is now backfiring. The reason is that initially
I assumed expressions to be tiny little objects with close to no copy
costs. The issue is related to those expressions holding temporaries.
Copying them (e.g. a product expression) means copying all the data
including the temporary and that will happen as many times as we nest
The only solution I can think about at the moment is the
specialization of ei_nested for those types and to go back to nesting
by reference for these heavy weight guys.