[eigen] sums peeling |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: [eigen] sums peeling*From*: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>*Date*: Mon, 19 Jan 2009 03:37:01 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=nUb9Y/oTxuwsNnjMcjnpMKCPNIxF6pLD6z+YsI60e00=; b=np+4ByuTJOU7HgwsWa+YkfRHiK5cbB8Sm7GMneabiCT6h1P32yAzVQt3lFZUvcLpza pZY28D6zaFUfO5JpiTvmb4ZcRW3x1IBHfAaKQoYXfQ0spg2J8A7l3eiTcXZN82TCXjjF 2k0KAQejRJQlgmxSlaw+fz0s+4GbMkUw9XF18=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=eK1I/t9Zk3c8HHPSnvlpydCsPEsJBFdFawwmTVWr58FIUVbMrd1Xe3Y49uaDfYFWwj ABbciQoZ/4Ic+1yL405MCkcQ7NOsMsoVxONEUxvkAoyVioLp4ZID1kzhV7Y7v3KDAm3p 0EKdJFfvBLenzvWd1haKvUryxZYSLMcfHHnK8=

Hi, This(attached diff) is the outcome from my work today on peeling sum()... Executive summary: i got speed improvements up to +35% but this is going to be stuff for eigen 2.1. Explanation: the benefit of peeling depends a lot on the expression that is being summed, but Eigen's current cost model is too simplistic to tell apart the expressions that benefit from peeling. Let's take a VectorXf v(10000); and SSE2. v.sum(); // peeling speed improvement: +6% v.cwise().square().sum(); // peeling improvement: +35% etc... so we get a nice improvement for CoeffReadCost roughly <=5 , especially nice when it is 2 or 3. Now let's take Two VectorXf v,w; (v.cwise()/w).sum(); // peeling decreases speed slightly Conclusion: peeling is beneficial when CoeffReadCost<=5 roughly AND involves only 1 load. So in addition to CoeffReadCost we need to keep track of how many loads are involved per coeff access. Cheers, Benoit

**Attachment:
diff**

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Fix for small Map bug.** - Next by Date:
**[eigen] 2.0 release process** - Previous by thread:
**Re: [eigen] Fix for small Map bug.** - Next by thread:
**[eigen] 2.0 release process**

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