Re: [eigen] help speeding up an expression? |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] help speeding up an expression?*From*: Márton Danóczy <marton78@xxxxxxxxx>*Date*: Sat, 3 Aug 2013 07:37:06 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=4ESyURiFOvdoBEdW15Wx1xmzjH2zf4Oe8/csDqhpazU=; b=KbVta7aO7yEdFvcRCh/4/GPz9Nez8n4xiOnBMh+ipduKZxSbe4lznFGap/I4v101IE 6e/KD17zRNoAFzrEc2rE5YCHkRLKriauepFadxEDvpJ9sAURxAlfdeluWuu/oM3vyPoO hxuB4EIlf0BU3H+fQfEoqGjXkWJYGjaf2AV/8vUQiWxOdIHTDfOvq65i+L8hxVRD7iAe poOUf4436ENQixGw5GiC03XKY9NEDV1c71l8CPf+UtQY22+fhjS5/1ik/+BtqvZCxc0+ u4XX2u3Ibd/9Cfg2JiUSgHRcVCu8b4mUWoYbWu2mscxjt2x6oYm32Bqq/ow0tbcDDicf SadA==

What about z*z*z + z*z = z*z*(z+1)?

Marton

On 2 Aug 2013 23:26, "Dick Lyon" <dicklyon@xxxxxxxxxx> wrote:

Has anyone got tips on how to speed up this eigen code that is the slowest part of my process?Simplified, I have this in an inline function definition with argument ArrayXf& z:z += 0.175;z = (z < 0).select(0.0, (z*z*z) / (z*z*z + z*z + 0.1));Can this be sped up by clever use of pre-allocated temp arrays? Or is eigen already more clever than anything I'd likely come up with? And how can I tell, or where should I look to learn more about how to think about optimizing such things?Is select fast? Or are there better ways to threshold things?I'm on an Intel platform, but ultimately also targeting Arm NEON, in case that matters.Dick

**Follow-Ups**:**Re: [eigen] help speeding up an expression?***From:*Ricard Marxer

**References**:**[eigen] help speeding up an expression?***From:*Dick Lyon

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] help speeding up an expression?** - Next by Date:
**Re: [eigen] help speeding up an expression?** - Previous by thread:
**[eigen] help speeding up an expression?** - Next by thread:
**Re: [eigen] help speeding up an expression?**

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