<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>mikeash.com pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html comments</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>mikeash.com Recent Comments</description><lastBuildDate>Mon, 17 Aug 2026 11:30:09 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>mikeash - 2014-11-26 02:40:14</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>There wouldn't be much if any difference between ARM32 and ARM64, since they're just two different modes of the same CPU, and those two modes almost certainly share the same memory controller hardware.</description><guid isPermaLink="true">8ce8a0b6e48230430c7a65697768c163</guid><pubDate>Wed, 26 Nov 2014 02:40:14 GMT</pubDate></item><item><title>Mac Restore - 2014-11-13 01:07:34</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>How about the different between ARM 32-bit architecture and 64-bit for loading a byte of memory?</description><guid isPermaLink="true">1e3a3eca69057964bd58c16010e9c256</guid><pubDate>Thu, 13 Nov 2014 01:07:34 GMT</pubDate></item><item><title>Manish - 2013-02-09 17:09:44</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>Great article!
&lt;br /&gt;The succinct manner in which the article has been written over-rides the complex stuff which is conveyed. Very informative stuff,
&lt;br /&gt;
&lt;br /&gt;Thanks</description><guid isPermaLink="true">f5344fbfb2d36b65ba9deca8143fc4a1</guid><pubDate>Sat, 09 Feb 2013 17:09:44 GMT</pubDate></item><item><title>foFox - 2013-01-13 03:20:16</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>As usual great stuff :)</description><guid isPermaLink="true">644e3b19ca1f97d0685fa0fb9e0b4356</guid><pubDate>Sun, 13 Jan 2013 03:20:16 GMT</pubDate></item><item><title>David Smith - 2013-01-03 01:45:23</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>A fun (and ballpark-accurate) rule of thumb that I recalled while reading the cache section is each time you double the size of a given cache, its miss rate drops by roughly a factor of sqrt(2). There's a much more detailed analysis at &lt;a href="http://researcher.watson.ibm.com/researcher/files/us-viji/cache-miss-sqrt2.pdf"&gt;http://researcher.watson.ibm.com/researcher/files/us-viji/cache-miss-sqrt2.pdf&lt;/a&gt;</description><guid isPermaLink="true">7f36c87bfaaee012ed8f233ee94517ef</guid><pubDate>Thu, 03 Jan 2013 01:45:23 GMT</pubDate></item><item><title>Rainer Brockerhoff - 2012-12-29 13:16:59</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>There's multiple levels in absolutely everything, just look at this: &lt;a href="http://abstrusegoose.com/strips/rube_goldberg_large.PNG"&gt;http://abstrusegoose.com/strips/rube_goldberg_large.PNG&lt;/a&gt; and it's grossly simplified at every level!</description><guid isPermaLink="true">2b7bbb5fe91d644f4fe1dfa7e4838623</guid><pubDate>Sat, 29 Dec 2012 13:16:59 GMT</pubDate></item><item><title>mikeash - 2012-12-28 23:41:50</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>&lt;b&gt;Bram Stolk:&lt;/b&gt; Note that the constraints in hardware are totally different from what we're used to in software. If you're willing to pay for the transistors, you can execute something like this completely in parallel:
&lt;br /&gt;&lt;code&gt;
&lt;br /&gt;for(int i = 0; i &amp;lt; TLB_SIZE; i++)
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(tlb[i].addr = searchAddr)
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return tlb[i].mapping;
&lt;br /&gt;&lt;/code&gt;
&lt;br /&gt;You basically have a different circuit for every iteration of the loop, and they all run simultaneously. Stuff like this is why modern processors are able to do so much more work &lt;i&gt;per clock cycle&lt;/i&gt; than older processors, and not just run at a higher clock rate. The continuing shrinkage of integrated circuit transistors means that more and more transistors are available for fancy parallel execution of our code.
&lt;br /&gt;
&lt;br /&gt;Just for an amusing comparison, an Intel 386, which is mostly functionally equivalent to a modern Intel processor, minus the 64-bit stuff and some other fancy bits, had about 275,000 transistors. An i7 has about two &lt;i&gt;billion&lt;/i&gt; transistors. That will buy you a lot of parallel TLB search iterations.</description><guid isPermaLink="true">d10d97d68e2c25363b353d6eb55174e4</guid><pubDate>Fri, 28 Dec 2012 23:41:50 GMT</pubDate></item><item><title>SSteve - 2012-12-28 21:33:53</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>When I start to think about all the levels of things going on in the computer I'm amazed that anything actually happens. And it always brings this to mind:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://xkcd.com/676/"&gt;http://xkcd.com/676/&lt;/a&gt;</description><guid isPermaLink="true">cdba070cfd48585f4c1f81766f57f415</guid><pubDate>Fri, 28 Dec 2012 21:33:53 GMT</pubDate></item><item><title>Rainer Brockerhoff - 2012-12-28 20:20:50</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>The TLB is usually an associative device, meaning it can compare a page address against &lt;i&gt;all&lt;/i&gt; of its entries in a single clock cycle, or even a fraction of that. Expensive to implement in silicon, but worth it. I think modern CPUs have multiple-level TLBs, even.</description><guid isPermaLink="true">94799eefdb6ae3dd014d18e59ec14d6f</guid><pubDate>Fri, 28 Dec 2012 20:20:50 GMT</pubDate></item><item><title>warmi - 2012-12-28 19:55:29</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>Multiple caching levels have all sorts of implications including things like the fact that using simple sequential containers ( arrays) for linear searches of small data, tends to faster than elaborate structures like hashes/maps ...
&lt;br /&gt;
&lt;br /&gt;In general, data-oriented programming is making comeback in performance oriented code ( games etc)
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://justinliew.com/blog/?p=2890"&gt;http://justinliew.com/blog/?p=2890&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><guid isPermaLink="true">13aab6b319fc7cf19844b891a558d512</guid><pubDate>Fri, 28 Dec 2012 19:55:29 GMT</pubDate></item><item><title>Bram Stolk - 2012-12-28 16:33:41</title><link>http://www.mikeash.com/?page=pyblog/friday-qa-2012-12-28-what-happens-when-you-load-a-byte-of-memory.html#comments</link><description>How is the TLB search performed?
&lt;br /&gt;Hopefully not a linear search?
&lt;br /&gt;More memory use would mean more entries, would mean a slower look up?
&lt;br /&gt;That sounds horrible.
&lt;br /&gt;</description><guid isPermaLink="true">0085b378a0225d1942b6f0c88f0f0761</guid><pubDate>Fri, 28 Dec 2012 16:33:41 GMT</pubDate></item></channel></rss>
