🔑 Key Learning Outcomes
- Understanding JavaScript's Performance Characteristics: Learn how JavaScript is converted into low-level CPU instructions, focusing on memory operations, inline caching, and deoptimization.
- Comprehending CPU Mechanics: Gain insight into how CPUs execute code, including the role of registers, the arithmetic logic unit, and the program counter.
- Exploring Virtual Machines: Develop a mental model of how virtual machines, like Google's V8 engine, optimize and execute JavaScript code efficiently.
- Analyzing JavaScript Performance: Use tools like the deopt explorer to inspect and optimize JavaScript code, focusing on object shapes, hidden classes, and inline caching.
👨🏫 About the Course
The course delves into the inner workings of JavaScript virtual machines, providing a comprehensive understanding of how high-level JavaScript is executed at the machine level. Through examining the V8 engine's performance characteristics, learners will build a foundational understanding of how virtual machines interact with computer hardware. This course covers a range of topics, including CPU mechanics, optimization techniques, and the intricacies of JavaScript performance.
🎯 Target Audience
- Developers interested in low-level programming and performance optimization.
- JavaScript programmers seeking to deepen their understanding of how JavaScript engines work.
- Computer science students and professionals looking to explore virtual machines and CPU architecture.
✅ Requirements
- Basic knowledge of JavaScript programming.
- Familiarity with computer science concepts is beneficial but not required.
📖 Course Content
Introduction
- Overview of JavaScript virtual machines and their connection to physical hardware.
How the CPU Runs Code
- Physical & Virtual Machines: Role of virtual machines in code-CPU communication.
- CPU Basics & Speed Limits: Introduction to CPU components and performance enhancements.
- CPU Memory Management: Memory management techniques and operations.
- CPU Subroutines & Calling Conventions: Understanding subroutines and stack management.
- CPU Q&A: Discussion on hardware architecture and RAM in relation to JavaScript engines.
Fibonacci
- Transition from machine language to assembly language using Fibonacci sequence examples.
Virtual Machine Inlining & Deopt
- Optimizing Code: Balance between speed and memory in code optimization.
- Deopt Explorer & Fixing a Deopt: Using tools to analyze JavaScript performance.
- Object Shapes & Hidden Classes: Impact of object shapes on JavaScript performance.
Micro Benchmarking
- Object Shapes & Inline Caching: Analyzing inline caching's role in performance.
- Inspecting Inline Caches with Deopt Explorer: Using deopt explorer for performance insights.
- Double & Triple Equals: Examining performance differences between equality operators.
- Object & Array Copying: Performance considerations in object and array manipulations.
- Negative Numbers: Exploring the impact of negative zero on performance.
- Holey Arrays: Understanding performance challenges with arrays containing holes.
Amdahl’s Law
- Importance of optimizing significant code portions for overall performance.
Drop a comment
Bare Metal JavaScript: The JavaScript Virtual Machine by Miško Hevery
Log in to leave a feedback
Login👇 Psst! Interested in More JavaScript Courses?

JavaScript PerformanceVideo
by Steve Kinney
🕹️ Levels: 😎 Intermediate
⏳ Duration: 5 hours
🤑 Price: Subscription
🧑💻 Learning Platform: Frontend Masters

Practical Problem Solving with AlgorithmsVideo
by Kyle Simpson
🕹️ Levels: 😎 Intermediate, 🚀 Advanced
⏳ Duration: 9 hours
🤑 Price: Subscription
🧑💻 Learning Platform: Frontend Masters


Immutable JavaScript Data Structures with ImmerVideo
by Michel Weststrate
🕹️ Levels: 😎 Intermediate
⏳ Duration: 1 hours
🤑 Price: Free
🧑💻 Learning Platform: Egghead.io