You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>We’ve been lied to. They keep showing us charts where CPU speed goes up and up
39
-
every year as if Moore’s Law isn’t just a historical observation but some kind
40
-
of divine right. Without lifting a finger, we software folks watch our programs
38
+
<p>We’ve been lied to. They keep showing us charts where CPU speed goes up and up
39
+
every year as if Moore’s Law isn’t just a historical observation but some kind
40
+
of divine right. Without lifting a finger, we software folks watch our programs
41
41
magically accelerate just by virtue of new hardware.</p>
42
-
<p>Chips <em>have</em> been getting faster (though even that’s plateauing now), but the
43
-
hardware heads failed to mention something. Sure, we can <em>process</em> data faster
42
+
<p>Chips <em>have</em> been getting faster (though even that’s plateauing now), but the
43
+
hardware heads failed to mention something. Sure, we can <em>process</em> data faster
44
44
than ever, but we can’t <em>get</em> that data faster.</p>
45
45
<p><spanname="legend"></span></p>
46
46
<p><imgsrc="images/data-locality-chart.png" alt="A chart showing processor and RAM speed from 1980 to 2010. Processor speed increases quickly, but RAM speed lags behind." /></p>
47
47
<asidename="legend">
48
48
49
-
<p>Processor and RAM speed relative to their respective speeds in 1980. As you can
49
+
<p>Processor and RAM speed relative to their respective speeds in 1980. As you can
50
50
see, CPUs have grown in leaps and bounds, but RAM access is lagging far behind.</p>
51
51
<p>Data for this is from <em>Computer Architecture: A Quantitative Approach</em>
52
-
by John L. Hennessy, David A. Patterson, Andrea C. Arpaci-Dusseau by way of Tony
52
+
by John L. Hennessy, David A. Patterson, Andrea C. Arpaci-Dusseau by way of Tony
53
53
Albrecht’s “<ahref="http://seven-degrees-of-freedom.blogspot.com/2009/12/pitfalls-of-object-oriented-programming.html">Pitfalls of Object-Oriented Programming</a>”.</p>
54
54
</aside>
55
55
56
-
<p>For your super-fast CPU to blow through a ream of calculations, it actually has
57
-
to get the data out of main memory and into registers. As you can see, RAM hasn’t
56
+
<p>For your super-fast CPU to blow through a ream of calculations, it actually has
57
+
to get the data out of main memory and into registers. As you can see, RAM hasn’t
58
58
been keeping up with increasing CPU speeds. Not even close.</p>
59
-
<p>With today’s hardware, it can take <em>hundreds</em> of cycles to fetch a byte of data
60
-
from <spanname="ram">RAM</span>. If most instructions need data, and it takes
61
-
hundreds of cycles to get it, how is it that our CPUs aren’t sitting idle 99%
59
+
<p>With today’s hardware, it can take <em>hundreds</em> of cycles to fetch a byte of data
60
+
from <spanname="ram">RAM</span>. If most instructions need data, and it takes
61
+
hundreds of cycles to get it, how is it that our CPUs aren’t sitting idle 99%
62
62
of the time waiting for data?</p>
63
-
<p>Actually, they <em>are</em> stuck waiting on memory an astonishingly large fraction of
64
-
time these days, but it’s not as bad as it could be. To explain how, let’s take
63
+
<p>Actually, they <em>are</em> stuck waiting on memory an astonishingly large fraction of
64
+
time these days, but it’s not as bad as it could be. To explain how, let’s take
65
65
a trip to the Land of Overly Long Analogies…</p>
66
66
<asidename="ram">
67
67
68
-
<p>It’s called “random access memory” because, unlike disc drives, you can
69
-
theoretically access any piece of it as quick as any other. You don’t have
68
+
<p>It’s called “random access memory” because, unlike disc drives, you can
69
+
theoretically access any piece of it as quick as any other. You don’t have
70
70
to worry about reading things consecutively like you do a disc.</p>
71
71
<p>Or, at least, you <em>didn’t</em>. As we’ll see, RAM isn’t so random access anymore.</p>
0 commit comments