Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,678 of 2,753    |
|    Eric Fisher to All    |
|    Can this type of cache miss be reduced?    |
|    01 Jun 09 09:14:57    |
   
   From: joefoxreal@gmail.com   
      
   Hi,   
      
   Optimizations for cache miss are often that loop transformations, such   
   as loop interchange, loop blocking, etc.   
      
   But, for a large one-dimensional array, suppose the elements are only   
   accessed once, can we still reduce the cache miss?   
      
   Example:   
      
   #define NUM 320*240*3   
   static const char a[NUM] = {.......};   
   char *ptr=a;   
   for (i = 0; i < NUM; i++)   
    {   
    x = *ptr++;   
    y = *ptr++;   
    z = *ptr++;   
      
    fun(x, y, z);   
    }   
      
   Cheers   
   Eric Fisher   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca