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

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


2010/6/18 David Roundy <roundyd@xxxxxxxxxxxxxxxxxxxxxxx>:
> On Fri, Jun 18, 2010 at 12:09 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> This smells like code tuned for larger CPU caches than your Core i5 has. Indeed:
>>  - you are using very large matrices, so it's crucial that blocks fit
>> in the cpu caches.
>>  - Core i5 are mass market cpus with presumably not too big caches.
>>
>> Try finding out the size of your caces (e.g. cat /proc/cpuinfo on
>> linux) and playing with Eigen's cache size settings (see recent thread
>> here).
>
> Is this something that could be done automatically at runtime?

It's nontrivial, but it's not unthinkable that we could get a sensible
default computed automatically. We have solved the big problem of
where to store state in a template library, by storing state as static
local vars in functions. The next problem is how to find out the cache
size on each platform we aim to support. Of course, at the very best,
we could get a sensible default, but in many cases only the user can
really know what value is right, since the cpu cache is going to be
shared with other threads and processes.

Benoit

>
> David
>
>
>



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