News Score: Score the News, Sort the News, Rewrite the Headlines

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 the spec sheet told me, and I believed it, because I am a trusting person. So when I wrote a program to scan a 1GB array and it took 400 milliseconds, I was confused. That's not billions of anything. That's just... slow. Embarrassingly slow. The kind of slow that makes you question your life choices. The CPU wasn't the problem. It was sitting there, starving, waiting for data that memory couldn't deliver fast enough. T...

Read more at prawns.dev

© News Score  score the news, sort the news, rewrite the headlines