Re: [eigen] Speed issues, array min,max

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


Your example is flawed, since it is trivial enough for the compiler to optimize away (almost) entirely. Add EIGEN_ASM_COMMENT("begin/end..."); lines and have a look at the generated assembler to see what I mean.

If the values of the vectors are not known at compile-time (and not the same for each iteration), you should get essentially the same assembler with Eigen and your hand-coded version -- but with less lines of code.

Christoph

On 05.10.2015 15:21, Gabriel wrote:
Why is this test code so slow for eigen3

(see simple main)
*http://pastebin.com/11XzzNFs*


Output here with gcc 4.9.2 , full optimization is turned on:

*Eigen3: time: 0.150045 ms **
**Seperate: time: 0.000131 ms **
*
So it seems that it is not beneficial to use eigen for this simple index
calculations, but why?


Thanks for the help! :-)




--
 Dipl. Inf., Dipl. Math. Christoph Hertzberg

 Universität Bremen
 FB 3 - Mathematik und Informatik
 AG Robotik
 Robert-Hooke-Straße 1
 28359 Bremen, Germany

 Zentrale: +49 421 178 45-6611

 Besuchsadresse der Nebengeschäftstelle:
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Tel.:    +49 421 178 45-4021
 Empfang: +49 421 178 45-6600
 Fax:     +49 421 178 45-4150
 E-Mail:  chtz@xxxxxxxxxxxxxxxxxxxxxxxx

 Weitere Informationen: http://www.informatik.uni-bremen.de/robotik



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