[Scilab-users] About performance

Clément David clement.david at scilab-enterprises.com
Mon Mar 6 10:16:08 CET 2017


Hi Amanda,

Le jeudi 02 mars 2017 à 18:24 -0300, Amanda Osvaldo a écrit :
> Just a note about performance in computing.
> 
> I read the Intel articles in Intel Developer Zone and frequently they call to think about the
> limitations in the memory cache and the set of instructions used to do the computation.
> 
> Even if all the data can be vectorized, it's possible to put all the data and code in the
> processor cache to avoid them to search it in RAM?
> 
> I'm really like to take more control of it in my projects.
> Is about computer engineering I don't know how to handle it.
> 
> https://software.intel.com/pt-br/articles/how-memory-is-accessed?utm_campaign=Servers-Brazil&utm_s
> ource=Facebook&utm_medium=SocialMedia&utm_content=content_460

I don't know how to do on windows but on linux (using the perf tool) I can detect L1 and L2 cache
miss for a running program. Starting from that I can easily reduce the data size until I got no more
cache miss.

In a "simple way" using Scilab, you can try to split your problem accordingly to the memory cache of
your machine. L1 cache might be used by the Scilab interpreter and simply use L2 cache size for data
manipulation, in my case :

L1: 128 kB
L2: 512 kB
L3: 3072 kB

L1 is for Scilab interpreter and MKL speedup
L2 can contain up to 65536 (512*1024/8) double values without performance penalty

So, I should split my problem to compute at most 65536 values to take the full advantage of L2. And
after that, I should use a dedicated tool (linux perf for exemple) to discover what can be done
better.

Regards,

--
Clément



More information about the users mailing list