Memory, Cache Locality, and why Arrays are Fast (Data Structures and Optimization)
Why is the first loop 10x faster than the second, despite doing the exact same work?
Follow me on:
Twitter: https://twitter.com/iced_coffee_dev
Github: https://github.com/simondevyoutube/
In this video we talk a bit about memory, the cpu caches (specifically the L1/L2/L3 cache), hardware prefetching, and how all this comes together for arrays. We'll be covering each of these topics in enough detail for you to get a solid understanding, working through real world examples to help illustrate the point. We'll talk about the most fundamental data structure, arrays, how they work, what situations they're great in, and when they suck. We'll also touch on some algorithmic complexity. Finally, we'll be talking about why understanding this is important and how this leads in to more advanced topics and data structures.
What's covered:
* How memory allocation works, memory addresses
* Contiguous memory
* CPU Caches, L1/L2/L3 cache
* Hardware prefetching
* Array operations, what's fast and what isn't
* Closing thoughts, why this is important to understand, how this relates to more advanced data structures
Видео Memory, Cache Locality, and why Arrays are Fast (Data Structures and Optimization) канала SimonDev
Follow me on:
Twitter: https://twitter.com/iced_coffee_dev
Github: https://github.com/simondevyoutube/
In this video we talk a bit about memory, the cpu caches (specifically the L1/L2/L3 cache), hardware prefetching, and how all this comes together for arrays. We'll be covering each of these topics in enough detail for you to get a solid understanding, working through real world examples to help illustrate the point. We'll talk about the most fundamental data structure, arrays, how they work, what situations they're great in, and when they suck. We'll also touch on some algorithmic complexity. Finally, we'll be talking about why understanding this is important and how this leads in to more advanced topics and data structures.
What's covered:
* How memory allocation works, memory addresses
* Contiguous memory
* CPU Caches, L1/L2/L3 cache
* Hardware prefetching
* Array operations, what's fast and what isn't
* Closing thoughts, why this is important to understand, how this relates to more advanced data structures
Видео Memory, Cache Locality, and why Arrays are Fast (Data Structures and Optimization) канала SimonDev
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Linked Lists vs Arrays, When They Suck, and When They Don't (Data Structures and Optimization)How I Optimized My JavaScript Project (Complete Walkthrough) | Faster Spatial Hash GridsThree.js Post Processing Tutorial | Easy & Quick for Beginners (JavaScript)How do computers read code?I made an EVEN BETTER MinecraftFlocking Simulation: Boids (JavaScript)Branchless Programming: Why "If" is Sloowww... and what we can do about it!Spatial Hash Grids & Tales from Game Development3D World Generation: Heightmap TutorialProcedural Plant Generation with L-SystemsWhy do CPUs Need Caches? - ComputerphileHow Many AI Agents can JavaScript Handle?Big-O Notation, Time Complexity, and What Even Google Engineers Get WrongPerformance x64: Cache Blocking (Matrix Blocking)Writing a Particle System (using Three.js)An Overview of Arrays and Memory (Data Structures & Algorithms #2)3D World Generation #8: Floating Origins for Bigger Worlds (JavaScript/Three.js)How Slow is JavaScript Really? JavaScript vs C++ (Data Structures & Optimization)Simple Third Person Camera (using Three.js/JavaScript)