jzarnett / ece459

ECE 459: Programming for Performance
436 stars 136 forks source link

Minor cleanup to L02. #23

Closed bhamodi closed 5 years ago

bhamodi commented 6 years ago

Changelog:

Before:

screen shot 2018-01-21 at 9 23 16 pm

After:

screen shot 2018-01-21 at 9 23 31 pm
patricklam commented 6 years ago

I disagree with the last two, which are rhetorically worse or lead to a sentence without a verb. (Compare is correct, not compared)

On Jan 22, 2018 11:46 AM, "Baraa Hamodi" notifications@github.com wrote:

@bhamodi commented on this pull request.

In lectures/L02.tex https://github.com/jzarnett/ece459/pull/23#discussion_r162996212:

If we want to get better performance, we need to figure out where time is going. For that we will have the subject of profiling, which comes up in some later lectures. If we can track down where our cache misses are occurring, maybe, just maybe, we can do something about it.

\section*{A Deeper Look at Cache Misses}

-As discussed, the CPU generates a memory address for a read or write operation. The address will be mapped to a page. Ideally, the page is found in the cache, because that would be faster. If the requested page is, in fact, in the cache, we call that a cache \textit{hit}. If the page is not found in the cache, it is considered a cache \textit{miss}. In case of a miss, we must load the page from memory, a comparatively slow operation. The percentage of the time that a page is found in the cache is called the \textit{hit ratio}, because it is how often we have a cache hit. We can calculate the effective access time if we have a good estimate of the hit ratio (which is not overly difficult to obtain) and some measurements of how long it takes to load data from the cache and how long from memory. The effective access time is therefore computed as: +As discussed, the CPU generates a memory address for a read or write operation. The address will be mapped to a page. Ideally, the page is found in the cache, because that would be faster. If the requested page is, in fact, in the cache, we call that a cache \textit{hit}. If the page is not found in the cache, it is considered a cache \textit{miss}. In case of a miss, we must load the page from memory, a comparatively slow operation. The percentage of the time that a page is found in the cache is called the \textit{hit ratio}, because it is how often we have a cache hit. We can calculate the effective access time if we have a good estimate of the hit ratio (which is not overly difficult to obtain) and some measurements of how long it takes to load data from cache and from memory. The effective access time is therefore computed as:

https://www.diffchecker.com/cGEpphh4

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jzarnett/ece459/pull/23#pullrequestreview-90541922, or mute the thread https://github.com/notifications/unsubscribe-auth/AByidv2k8PLRdXH-wPeiAPxKITePNQisks5tNLtNgaJpZM4RmFr8 .

bhamodi commented 6 years ago

Alright, reverted the last two changes @patricklam and squashed my commits. Should be good to go now.