Why are Angular and React so fast?
summary
Explains why Angular and React achieve high raw speed by changing object layouts and data representation so JavaScript engines (V8) can use monomorphic property access and inline caches/feedback vectors to optimize hot paths, yielding up to ~100× faster property reads versus megamorphic access. Describes packing flags into 32-bit bit‑fields to avoid allocations and using a small Bloom filter for hierarchical dependency injectors (up to 255 services) to skip lookups, reducing GC pressure and pointer indirection.
AI-written summary · about
chapters (17)
- 0:00Welcome
- 1:04Angular and React speed
- 3:39Introduction
- 4:02JS optimization
- 4:22Monomorphism in property access
- 7:14Why monomorphism matters
- 9:19V8 hidden classes
- 12:50Inline cache speed
- 14:38Angular/React monomorphism
- 18:26React bit fields
- 22:08React effects with bit fields
- 23:10Bit fields for objects
- 27:10Bloom filters explained
- 31:28Angular injectors
- 35:28Angular DI with Bloom filters
- 36:09Q&A
- 37:31Summary
related talks
55mA sneak peek into super optimized code in JS frameworks
31mFrom Angular to React and back again
19mAngular + React = Speed
43mAngular and React: friends learning from each other
39mAlgorithms in the Front End: from V8 to VDOM
49mA comparison of the Reactivity Concepts in Angular, React, Vue and Svelte
21mWhere & How You Write Your Code
30mUse Angular for better React apps
