Skip to main content

3 posts tagged with "parsing"

View All Tags

The cost of JavaScript in 2019

· 14 min read
Addy Osmani ([@addyosmani](https://twitter.com/addyosmani)), JavaScript Janitor, and Mathias Bynens ([@mathias](https://twitter.com/mathias)), Main Thread Liberator
note

Note: If you prefer watching a presentation over reading articles, then enjoy the video below! If not, skip the video and read on.

“The cost of JavaScript” as presented by Addy Osmani at #PerfMatters Conference 2019.

Blazingly fast parsing, part 2: lazy parsing

· 15 min read
Toon Verwaest ([@tverwaes](https://twitter.com/tverwaes)) and Marja Hölttä ([@marjakh](https://twitter.com/marjakh)), sparser parsers

This is the second part of our series explaining how V8 parses JavaScript as fast as possible. The first part explained how we made V8’s scanner fast.

Parsing is the step where source code is turned into an intermediate representation to be consumed by a compiler (in V8, the bytecode compiler Ignition). Parsing and compiling happens on the critical path of web page startup, and not all functions shipped to the browser are immediately needed during startup. Even though developers can delay such code with async and deferred scripts, that’s not always feasible. Additionally, many web pages ship code that’s only used by certain features which may not be accessed by a user at all during any individual run of the page.

Blazingly fast parsing, part 1: optimizing the scanner

· 11 min read
Toon Verwaest ([@tverwaes](https://twitter.com/tverwaes)), scandalous optimizer

To run a JavaScript program, the source text needs to be processed so V8 can understand it. V8 starts out by parsing the source into an abstract syntax tree (AST), a set of objects that represent the program structure. That AST gets compiled to bytecode by Ignition. The performance of these parse + compile phases is important: V8 cannot run code before compilation is done. In this series of blog posts, we focus on parsing, and the work done in V8 to ship a blazingly fast parser.