3 ms·
> Modern JavaScript VMs like V8 will often optimise functions treating types as static, then "deoptimise" in the rare case their type assumptions are broken. A
by monocasa 10y ago
> Modern JavaScript VMs like V8 will often optimise functions treating types as static, then "deoptimise" in the rare case their type assumptions are broken.
And that logic that's needed to test invariants is exactly the overhead we're talking about.