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

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


Christoph,

You were right about moving the operations outside of main. For long long ints the two times are within 1%, even with vectors of length 300. But with doubles Eigen is twice as fast at a length of 300; the times are close only when I use a tiny length of 3. Do we expect a discrepancy between long longs and doubles?

On Mon, Oct 5, 2015 at 11:02 AM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:


On 05.10.2015 18:08, Gabriel wrote:
Thanks a lot!
I thought something is flawed, but
I compared the assembler output with comments of the following
(hopefully unflawed problem, random numbers, all the same )

http://pastebin.com/qDvLGBfU

I get close timings, but Eigen3 is still slower what can also be seen
from the assembler output below
Is my example still flawed, the Eigen internal dense assignment loop is
not inlined?

Unfortunately, GCC sometimes fails to properly optimize code inside the main function. After moving your code into a different function, I get exactly the same assembly (except for a cmovle/cmovs difference, because you put the zero in front and not at the end, in the Eigen version).
If you still experience speed-differences, it's because the second loop can work with already initialized caches.

Christoph





--
 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





--
Nate Yonkee
Graduate research assistant
All around great guy


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