3 ms·
> Browsers are often able to defer parsing of JS functions until they're called, so dead JS code doesn't cost much in parsing time. You sure? Just figuring out
by saagarjha 4y ago
> Browsers are often able to defer parsing of JS functions until they're called, so dead JS code doesn't cost much in parsing time.
You sure? Just figuring out what to call us going to typically require full parsing to find identifiers, scoping, etc.
- Leszek 4y agoBrowsers do a fast partial parse to figure out things like scoping and variable names, but skip actually building an AST so it's still a lot quicker than full parsing (e.g. https://v8.dev/blog/preparser https://v8.dev/blog/preparser)