Re: [eigen] Performance gap between gcc and msvc ?

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


I've checked with icc, it does the computation in 11s...

For comparaison, I can do a 4096x4096 qr reduction (double) in less than

16 sec with gcc and icc on a core2 quad.

It seems to be a bug related with core i5 and linux, maybe only under

openSuse 11.3. I may try with ubuntu in a near future.



On Sun, 20 Jun 2010 10:34:18 -0400, Benoit Jacob

<jacob.benoit.1@xxxxxxxxx>

wrote:

> forgot to reply earlier, but thanks a lot for the code, that can come in

> handy!

> 

> 

> 2010/6/18 Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>:

>>

>> If that might help, I use the following code in one of my project to

get

>> a working 'cpuid' across compilers:

>> (inside a proper #ifdef for x86/amd64, of course):

>>

>> #if defined(__GNUC__)

>> #    if defined(__PIC__) && defined(__i386__)

>> #    define cpuid(abcd,func) \

>>        __asm__ __volatile__ ("xchgl %%ebx, %%esi;cpuid; xchgl

>> %%ebx,%%esi": "=a" (abcd[0]), "=S" (abcd[1]), "=c" (abcd[2]), "=d"

>> (abcd[3]) : "a" (func));

>> #    else

>> #    define cpuid(abcd,func) \

>>        __asm__ __volatile__ ("cpuid": "=a" (abcd[0]), "=b" (abcd[1]),

>> "=c" (abcd[2]), "=d" (abcd[3]) : "a" (func) );

>> #    endif

>> #elif defined(_MSC_VER)

>> #    define cpuid(abcd,func) __cpuid((int*)abcd,func)

>> #endif

>>

>> #ifndef cpuid

>> #error "Failed to find a way to get cpuid() for this architecture."

>> #endif

>>

>> (and wikipedia describes what you can get, very useful :-)

>>

>> Thomas

>> --

>> Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>

>> http://www.freehackers.org/thomas

>>

>> In data venerdì 18 giugno 2010 23:42:50, Benoit Jacob ha scritto:

>>> ok, looks what we need is just the CPUID instruction.

>>>

>>>

http://en.wikipedia.org/wiki/CPUID#EAX.3D2:_Cache_and_TLB_Descriptor_information

>>>

>>> apparently this is what linux uses for /proc/cpuinfo.

>>

>>

>>



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