[vorbis-dev] Cache collisions
Tal
tabir at actcom.net.il
Wed May 5 22:55:00 PDT 2004
Vtune sampling showed that the is a lot of cache collisions in
bark_noise_hybridmp.
We've read in the manual that each address is mapped to a cache bank by
the 5:15 bits.
We've printed out n and it seems to be one of two: 4K, 0.5K.
This means that the N array and XY array fall into the same bank in the
cache.
tatic void bark_noise_hybridmp(int n,const long *b,
const float *f,
float *noise,
const float offset,
const int fixed){
float *N=alloca(n*sizeof(*N));
float *X=alloca(n*sizeof(*N));
float *XX=alloca(n*sizeof(*N));
float *Y=alloca(n*sizeof(*N));
float *XY=alloca(n*sizeof(*N));
<p>We've tried allocating 1K more for N array and we got 8% speedup
tatic void bark_noise_hybridmp(int n,const long *b,
const float *f,
float *noise,
const float offset,
const int fixed){
#define K 1024
float *N=alloca(n*sizeof(*N));
float *X=alloca(n*sizeof(*N));
float *XX=alloca(n*sizeof(*N)+K);
float *Y=alloca(n*sizeof(*N));
float *XY=alloca(n*sizeof(*N));
AMD data cache size is 64K so I guess there might be a similar problem
there.
<p>Tal.
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list