




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Various compiler optimizations to reduce cache misses, including techniques such as reordering procedures, merging arrays, loop interchange, loop fusion, and blocking. Real-life examples are provided to illustrate the benefits of each optimization.
Typology: Slides
1 / 8
This page cannot be seen from the preview
Don't miss anything!
/* Before: 2 sequential arrays */ int val[SIZE]; int key[SIZE];
/* After: 1 array of stuctures */ struct merge { int val; int key; }; struct merge merged_array[SIZE];
/* Before */ for (i = 0; i < N; i = i+1) for (j = 0; j < N; j = j+1) a[i][j] = 1/b[i][j] * c[i][j]; for (i = 0; i < N; i = i+1) for (j = 0; j < N; j = j+1) d[i][j] = a[i][j] + c[i][j];
/* After */ for (i = 0; i < N; i = i+1) for (j = 0; j < N; j = j+1) { a[i][j] = 1/b[i][j] * c[i][j]; d[i][j] = a[i][j] + c[i][j];}
/* Before */
for (i = 0; i < N; i = i+1)
for (j = 0; j < N; j = j+1) {r = 0; for (k = 0; k < N; k = k+1){ r = r + y[i][k]*z[k][j];}; x[i][j] = r; };
Blocking Factor
Miss Rate
Fully Associativ e Cache
Dire ct M appe d Cache
Pe rformance Improv e me nt
compre ss
chole sky (nasa7)
spice
mxm (nasa7)
btrix (nasa7)
tomcatv
gmty (nasa7)
v pe nta (nasa7)
me rge d arrays
loop inte rchange
loop fusion blocking