more cache

2 views
Skip to first unread message

Kelvin

unread,
Dec 10, 2009, 7:01:42 PM12/10/09
to utexas-cs352-fall2009
For problem 6.28, I know the answer is 25% but I wanted to make sure
my reasoning behind it is correct.

the buffer array is only 4 bytes since each character is only 1 byte
the inner loop only happens 480 times so 480 * 4 = 1920 bytes of cache
needed for the whole array
since there's 64kb, the array fits inside the cache so the only misses
are the initial misses

thus 25%?

Addison Denenberg

unread,
Dec 10, 2009, 8:00:37 PM12/10/09
to Kelvin, utexas-cs352-fall2009
Yes, it is 25% because for each element from buffer loaded into the cache, there is one miss (the initial read of the element for buffer[i][j].r), followed by 3 hits (buffer[i][j].g, b, a) since that element has already been loaded into the cache.
Reply all
Reply to author
Forward
0 new messages