GridVids
Sign in with YouTube

How I Optimized My JavaScript Project (Complete Walkthrough) | Faster Spatial Hash Grids

SimonDev Dec 7, 2020 12:00
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

Follow me on: Twitter: https://twitter.com/iced_coffee_dev Github: https://github.com/simondevyoutube/ In this project, we're doing some JavaScript optimization. This is a follow-up to our last project that covered spatial hash grids, or spatial hashing as it's sometimes referred to. Anyway, we're continuing and building on that JavaScript spatial hash grid implementation, but we'll be examining it in detail with Chrome's DevTools profiler, looking for hotspots and optimization opportunities. I'll take you step by step through the process, benchmarking the code, examining the profile, and ultimately making the existing implementation dramatically faster. Whether you're a game developer interested in this specific spatial hash grid data structure, or a JavaScript developer looking to work on your optimization skills, this has a lot to offer. Understanding datastructures, having a complete and thorough basis with them is a key skill for any game developer. It's a complex field with tradeoffs between memory, time complexity, and even development and maintenance cost all come into play. Understanding how to look at code, profile, optimize, and in short speed it up are import skills for a developer. In the video, we cover: * Looking at the overall optimization strategy, how to approach a chunk of code for improvement. * Profiling & Optimization in Chrome, using the built-in DevTools to capture profiling data and examine it. * Walking through the sources tab to look at line-by-line hotspots in JavaScript code. * Weighing datastructure options, discussing the tradeoffs between Set containers, Map containers, arrays, and linked lists. * Actually making the JavaScript code optimized.
Science & Technology
#simondev #game development #programming tutorial #javascript optimization #javascript profiling #optimization #profiling #javascript optimization techniques #spatial hash grid #spatial hashing