AnsweredAssumed Answered

Reduced cache hit when I put a piece of code under loop!!

Question asked by sayantandatta on Jun 28, 2013



Card:       7970

Catalyst:  13.4

APP    :    2.8

OS      :    Kubuntu 12.04 x64


Code snippet:

//for (i =0 ; i  < 25 ; i++)



When I comment the the loop the cache hit (tested using codeXL 1.1)  is 99%. But as soon as I un comment it cache hit drops to 23% and the kernel execution time is increased by 50 times when it should increase only by 25 times.  The function encrypt() is quite large to fit into i-cache but still when there is no loop cache hit is 99%. But as soon as I increase the no iterations i.e anything more than 1 iteration the cache hit wil drop to 23% and the performance penalty is 2x times , where x is the number of iterations.