Why V8 Throws Away Perfectly Good Machine Code: TurboFan's Speculative Bets
TurboFan makes JavaScript fast by betting on types it has only observed, not proven. Here's how speculative optimization and de-optimization work, with a runnable trace example.