Why Your CPU Is Fast But Your Program Is Slow: Understanding the Memory Wall

My laptop's CPU can do billions of operations per second. I know this because&#xA;the spec sheet told me, and I believed it, because I am a trusting person. &#xA; So when I wrote a program to scan a 1GB array and it took 400 milliseconds,&#xA;I was confused. That's not billions of anything. That's just... slow.&#xA;Embarrassingly slow. The kind of slow that makes you question your life choices.…