Take the 2-minute tour ×  This is part of cachegrind output.
This part of code has been executed for 1224 times. elmg1 is an
array of unsigned long of size 16 x 20. My machine L1 cache size
is 32KB, 64B cache line size and 8-way set associative.    1.
for (i = 0; i < 20; i++) 78,336 2,448 2 50,184 0 0 1,224 0 0
2. {   3. telm01 = elmg1[i]; 146,880 0 0 73,440 0 0 24,480 0 0
4. telm31 = (telm01 << 3) ^ val1; 97,920 0 0 48,960 0 0 24,480 0
0   5. telm21 = (telm01 << 2) ^ (val1 >> 1); 146,880 1,224 1
48,960 0 0 24,480 0 0   6. telm11 = (telm01 << 1) ^ (val1 >> 2);
146,880 0 0 48,960 0 0 24,480 0 0   7. }  A. The reason I have
put it here, is that in the 3rd line inside the for loop, I see
a number of I1 misses (one L2 miss as well). It is somewhat
confusing and I could not guess the reason why?  B. I am trying
to optimize (time) a portion of code. The above is just a small
snippet. I think in my program memory access a costing me a lot.
Like in the above example elmg1 is an array of 16 x 20 size of
unsigned l