{"video_id":"sHqNMHf2UNI","title":"What is CPU Cache?","channel":"Techquickie","show":"Techquickie","published_at":"2017-05-06T14:58:16Z","duration_s":302,"segments":[{"start_s":0.08,"end_s":7.839,"text":"When you think of memory in your computer, you might think of things like DDR modules, VRAM on your graphics card,","speaker":null,"is_sponsor":0},{"start_s":5.92,"end_s":13.28,"text":"or most likely just hard drives and SSDs. But there's actually another type","speaker":null,"is_sponsor":0},{"start_s":10.24,"end_s":15.519,"text":"of memory that's incredibly fast and","speaker":null,"is_sponsor":0},{"start_s":13.28,"end_s":21.84,"text":"essential to the speed that we've gotten accustomed to with modern computers. I'm","speaker":null,"is_sponsor":0},{"start_s":18.48,"end_s":23.84,"text":"talking about your CPU cache. No, not","speaker":null,"is_sponsor":0},{"start_s":21.84,"end_s":28.0,"text":"the money that you blew on that processor with hyperthreading that you","speaker":null,"is_sponsor":0},{"start_s":25.76,"end_s":32.239,"text":"didn't really need. What we're talking about is cache with an E. It's a","speaker":null,"is_sponsor":0},{"start_s":30.56,"end_s":36.96,"text":"specialized type of memory that's built into your CPU. But why the heck would","speaker":null,"is_sponsor":0},{"start_s":35.2,"end_s":41.12,"text":"your processor need its own memory? Aren't the 16 gigs of RAM or whatever","speaker":null,"is_sponsor":0},{"start_s":39.52,"end_s":46.239,"text":"the heck you already have in your computer good enough? Well, not really,","speaker":null,"is_sponsor":0},{"start_s":44.0,"end_s":50.64,"text":"to be honest. You see, those RAM modules are a heck of a lot faster than say a","speaker":null,"is_sponsor":0},{"start_s":49.039,"end_s":56.079,"text":"hard drive in terms of data transfer. Like a lot faster. But your CPU actually","speaker":null,"is_sponsor":0},{"start_s":53.199,"end_s":60.48,"text":"wants data much faster than your RAM can even provide it. And on top of that, as","speaker":null,"is_sponsor":0},{"start_s":58.399,"end_s":65.84,"text":"CPUs have gotten faster over the years, they continue to outstrip typical RAM","speaker":null,"is_sponsor":0},{"start_s":62.96,"end_s":70.4,"text":"modules by wider and wider margins. Meaning that without faster memory, your","speaker":null,"is_sponsor":0},{"start_s":68.159,"end_s":75.439,"text":"CPU is going to be sitting around doing nothing like a kind of unproductive","speaker":null,"is_sponsor":0},{"start_s":72.799,"end_s":79.84,"text":"employee as it waits for RAM and you'll run into bottlenecks as a result. This","speaker":null,"is_sponsor":0},{"start_s":77.68,"end_s":85.84,"text":"is where cache comes in. Unlike system memory, which consists of dynamic RAM or","speaker":null,"is_sponsor":0},{"start_s":82.56,"end_s":88.08,"text":"DRAM, your CPU cache is static RAM or","speaker":null,"is_sponsor":0},{"start_s":85.84,"end_s":92.64,"text":"SRAMM, which is more expensive and takes up more space, but is much faster than","speaker":null,"is_sponsor":0},{"start_s":90.96,"end_s":97.36,"text":"DRAM because it doesn't have to be constantly refreshed in order to hold","speaker":null,"is_sponsor":0},{"start_s":95.04,"end_s":101.439,"text":"data the way that DRAM has to be. An average CPU will only have a few","speaker":null,"is_sponsor":0},{"start_s":99.28,"end_s":106.399,"text":"megabytes of cache, but it makes a tremendous use of this small amount of","speaker":null,"is_sponsor":0},{"start_s":103.92,"end_s":111.04,"text":"memory. You see, when a CPU accesses something from your main system RAM, it","speaker":null,"is_sponsor":0},{"start_s":108.72,"end_s":116.399,"text":"generally stores it in its cache, then uses complex algorithms to guess as to","speaker":null,"is_sponsor":0},{"start_s":114.24,"end_s":120.799,"text":"what other instructions or data it might need next. And it fetches those from","speaker":null,"is_sponsor":0},{"start_s":118.719,"end_s":125.92,"text":"your system RAM as well. Since these guesses aren't perfect, CPUs suffer from","speaker":null,"is_sponsor":0},{"start_s":123.52,"end_s":130.399,"text":"things called cache misses, where it searches its own cache, can't find what","speaker":null,"is_sponsor":0},{"start_s":128.16,"end_s":135.04,"text":"it needs, and has to access your system memory directly instead, which slows","speaker":null,"is_sponsor":0},{"start_s":133.04,"end_s":139.28,"text":"things down. Fortunately, however, modern processors have gotten pretty","speaker":null,"is_sponsor":0},{"start_s":136.879,"end_s":144.56,"text":"good at deciding what to put inside their caches, as they'll typically have","speaker":null,"is_sponsor":0},{"start_s":141.52,"end_s":146.8,"text":"a cache hit rate of better than 80%.","speaker":null,"is_sponsor":0},{"start_s":144.56,"end_s":151.76,"text":"Meaning that most of the time, your CPU is only processing what it finds in","speaker":null,"is_sponsor":0},{"start_s":149.36,"end_s":156.48,"text":"cache and doesn't have to bother talking to your slower system memory at all. And","speaker":null,"is_sponsor":0},{"start_s":154.239,"end_s":160.8,"text":"as you may have guessed, more cache is advantageous. So, when you're shopping","speaker":null,"is_sponsor":0},{"start_s":158.48,"end_s":166.8,"text":"for a processor, the product page will indicate how much level three or L3","speaker":null,"is_sponsor":0},{"start_s":163.68,"end_s":169.2,"text":"cache is built in with higherend modules","speaker":null,"is_sponsor":0},{"start_s":166.8,"end_s":173.76,"text":"having a few extra megabytes. And if you're wondering what the heck happened","speaker":null,"is_sponsor":0},{"start_s":170.879,"end_s":178.879,"text":"to levels one and two, these are smaller, even faster parts of the cache","speaker":null,"is_sponsor":0},{"start_s":176.16,"end_s":182.959,"text":"that your CPU will try and hit before looking for data in your level three","speaker":null,"is_sponsor":0},{"start_s":180.879,"end_s":189.04,"text":"cache. Okay, Luke, that's cool and all, but will better cache actually give me","speaker":null,"is_sponsor":0},{"start_s":185.04,"end_s":191.599,"text":"more FPS in games or faster speeds in my","speaker":null,"is_sponsor":0},{"start_s":189.04,"end_s":195.36,"text":"other stuff? Well, this can depend on the specific application, but you can","speaker":null,"is_sponsor":0},{"start_s":193.599,"end_s":200.319,"text":"see performance increases kind of overall on CPUs with larger caches.","speaker":null,"is_sponsor":0},{"start_s":198.48,"end_s":205.36,"text":"Fortunately, though, if you're buying a higherend processor because you need","speaker":null,"is_sponsor":0},{"start_s":202.56,"end_s":210.0,"text":"more cores, higher IPCs, or better overclocking potential in general, it'll","speaker":null,"is_sponsor":0},{"start_s":207.92,"end_s":214.64,"text":"probably come with more cash as well. So, it's not really something that you","speaker":null,"is_sponsor":0},{"start_s":211.36,"end_s":216.72,"text":"have to really think about too much. Of","speaker":null,"is_sponsor":0},{"start_s":214.64,"end_s":221.599,"text":"course, if you really want that high-end silicon, make sure that you're paying","speaker":null,"is_sponsor":0},{"start_s":218.64,"end_s":225.36,"text":"attention to how much cash with an S that your wallet has left. Are you","speaker":null,"is_sponsor":0},{"start_s":223.68,"end_s":228.879,"text":"trying to program payments into your app and it's just not that easy? If you're","speaker":null,"is_sponsor":0},{"start_s":227.2,"end_s":233.92,"text":"building a mobile app and searching for a simple payment solution, check out","speaker":null,"is_sponsor":0},{"start_s":230.879,"end_s":236.4,"text":"Brainree. Brainree's V.0 SDK is one","speaker":null,"is_sponsor":0},{"start_s":233.92,"end_s":239.68,"text":"amazingly simple integration away from giving you simple payments every time.","speaker":null,"is_sponsor":0},{"start_s":238.56,"end_s":244.56,"text":"Developers around the world have embraced the Brainree V.0 SDK as the","speaker":null,"is_sponsor":0},{"start_s":242.48,"end_s":248.08,"text":"easiest way to add secure mobile payments to their apps and websites.","speaker":null,"is_sponsor":0},{"start_s":246.0,"end_s":252.319,"text":"Once integrated, Brainree supports a bunch of different ways to pay like","speaker":null,"is_sponsor":0},{"start_s":249.439,"end_s":256.16,"text":"Apple Pay, Android Pay, PayPal, Venmo, credit cards, and even Bitcoin. And if","speaker":null,"is_sponsor":0},{"start_s":254.56,"end_s":260.56,"text":"something new pops up, Brainree will support that, too. It's used by Uber,","speaker":null,"is_sponsor":0},{"start_s":258.079,"end_s":264.4,"text":"Airbnb, GitHub. It's scalable. It integrates into your app easily. Just a","speaker":null,"is_sponsor":0},{"start_s":262.639,"end_s":268.24,"text":"few lines of code. Try it in the sandbox. Learn more about Brainree in","speaker":null,"is_sponsor":0},{"start_s":266.56,"end_s":274.199,"text":"the video description down below. and get your first 50,000 in transactions","speaker":null,"is_sponsor":0},{"start_s":271.12,"end_s":275.36,"text":"fee free at","speaker":null,"is_sponsor":0},{"start_s":274.199,"end_s":278.8,"text":"brainttreeepayments.com/techquicky. But are you cashed out? If you are, be sure","speaker":null,"is_sponsor":0},{"start_s":277.36,"end_s":282.479,"text":"to like the video, dislike the video, subscribe, do all those fun things. And","speaker":null,"is_sponsor":0},{"start_s":280.4,"end_s":286.639,"text":"on your way out the door, be sure to check out channel Superfund right across","speaker":null,"is_sponsor":0},{"start_s":284.16,"end_s":291.199,"text":"the street. They're fantastic. Highly recommended. And as always, leave a","speaker":null,"is_sponsor":0},{"start_s":289.199,"end_s":294.32,"text":"comment on the little book as you as you leave with the suggestions that you","speaker":null,"is_sponsor":0},{"start_s":292.8,"end_s":299.04,"text":"might have for how we could make your stay even more better next time. And","speaker":null,"is_sponsor":0},{"start_s":297.28,"end_s":302.96,"text":"anyways, thank you for enjoying Techquiki. We'll see you again.","speaker":null,"is_sponsor":0}],"full_text":"When you think of memory in your computer, you might think of things like DDR modules, VRAM on your graphics card, or most likely just hard drives and SSDs. But there's actually another type of memory that's incredibly fast and essential to the speed that we've gotten accustomed to with modern computers. I'm talking about your CPU cache. No, not the money that you blew on that processor with hyperthreading that you didn't really need. What we're talking about is cache with an E. It's a specialized type of memory that's built into your CPU. But why the heck would your processor need its own memory? Aren't the 16 gigs of RAM or whatever the heck you already have in your computer good enough? Well, not really, to be honest. You see, those RAM modules are a heck of a lot faster than say a hard drive in terms of data transfer. Like a lot faster. But your CPU actually wants data much faster than your RAM can even provide it. And on top of that, as CPUs have gotten faster over the years, they continue to outstrip typical RAM modules by wider and wider margins. Meaning that without faster memory, your CPU is going to be sitting around doing nothing like a kind of unproductive employee as it waits for RAM and you'll run into bottlenecks as a result. This is where cache comes in. Unlike system memory, which consists of dynamic RAM or DRAM, your CPU cache is static RAM or SRAMM, which is more expensive and takes up more space, but is much faster than DRAM because it doesn't have to be constantly refreshed in order to hold data the way that DRAM has to be. An average CPU will only have a few megabytes of cache, but it makes a tremendous use of this small amount of memory. You see, when a CPU accesses something from your main system RAM, it generally stores it in its cache, then uses complex algorithms to guess as to what other instructions or data it might need next. And it fetches those from your system RAM as well. Since these guesses aren't perfect, CPUs suffer from things called cache misses, where it searches its own cache, can't find what it needs, and has to access your system memory directly instead, which slows things down. Fortunately, however, modern processors have gotten pretty good at deciding what to put inside their caches, as they'll typically have a cache hit rate of better than 80%. Meaning that most of the time, your CPU is only processing what it finds in cache and doesn't have to bother talking to your slower system memory at all. And as you may have guessed, more cache is advantageous. So, when you're shopping for a processor, the product page will indicate how much level three or L3 cache is built in with higherend modules having a few extra megabytes. And if you're wondering what the heck happened to levels one and two, these are smaller, even faster parts of the cache that your CPU will try and hit before looking for data in your level three cache. Okay, Luke, that's cool and all, but will better cache actually give me more FPS in games or faster speeds in my other stuff? Well, this can depend on the specific application, but you can see performance increases kind of overall on CPUs with larger caches. Fortunately, though, if you're buying a higherend processor because you need more cores, higher IPCs, or better overclocking potential in general, it'll probably come with more cash as well. So, it's not really something that you have to really think about too much. Of course, if you really want that high-end silicon, make sure that you're paying attention to how much cash with an S that your wallet has left. Are you trying to program payments into your app and it's just not that easy? If you're building a mobile app and searching for a simple payment solution, check out Brainree. Brainree's V.0 SDK is one amazingly simple integration away from giving you simple payments every time. Developers around the world have embraced the Brainree V.0 SDK as the easiest way to add secure mobile payments to their apps and websites. Once integrated, Brainree supports a bunch of different ways to pay like Apple Pay, Android Pay, PayPal, Venmo, credit cards, and even Bitcoin. And if something new pops up, Brainree will support that, too. It's used by Uber, Airbnb, GitHub. It's scalable. It integrates into your app easily. Just a few lines of code. Try it in the sandbox. Learn more about Brainree in the video description down below. and get your first 50,000 in transactions fee free at brainttreeepayments.com/techquicky. But are you cashed out? If you are, be sure to like the video, dislike the video, subscribe, do all those fun things. And on your way out the door, be sure to check out channel Superfund right across the street. They're fantastic. Highly recommended. And as always, leave a comment on the little book as you as you leave with the suggestions that you might have for how we could make your stay even more better next time. And anyways, thank you for enjoying Techquiki. We'll see you again."}