Can this type of cache miss be reduced?

Eric Fisher <joefoxreal@gmail.com>
Mon, 1 Jun 2009 09:14:57 +0000 (UTC)

          From comp.compilers

Related articles
Can this type of cache miss be reduced? joefoxreal@gmail.com (Eric Fisher) (2009-06-01)
Re: Can this type of cache miss be reduced? gneuner2@comcast.net (George Neuner) (2009-06-01)
Re: Can this type of cache miss be reduced? max@gustavus.edu (Max Hailperin) (2009-06-02)
Re: Can this type of cache miss be reduced? joefoxreal@gmail.com (Eric Fisher) (2009-06-03)
Re: Can this type of cache miss be reduced? lkrupp@indra.com (Louis Krupp) (2009-06-03)
Re: Can this type of cache miss be reduced? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2009-06-03)
Re: Can this type of cache miss be reduced? max@gustavus.edu (Max Hailperin) (2009-06-03)
| List of all articles for this month |

From: Eric Fisher <joefoxreal@gmail.com>
Newsgroups: comp.compilers
Date: Mon, 1 Jun 2009 09:14:57 +0000 (UTC)
Organization: A poorly-installed InterNetNews site
Keywords: architecture, optimize, question
Posted-Date: 01 Jun 2009 10:23:28 EDT

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



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.