llhttp - new HTTP 1.1 parser for Node.js
summary
A new C parser is generated from TypeScript using a small DSL called llparse that compiles parser state graphs and does static checks and peephole optimizations, producing llhttp is twice as fast than the old parser, ships as Node 12’s default, and preserves the original comprehensive tests ported to markdown. The build is concrete: TypeScript DSL llparse compiles to C, matches and range callbacks are implemented, and benchmarks and tests show the replacement actually works.
AI-written summary · about
chapters (6)
- 0:00Start
- 7:27Scan input One character at time
- 11:06match
- 11:49pattern-to-number
- 12:37span
- 13:32otherwise
related talks
45mHTTP 2 for Node js Core
24mNode.js 12: A decade of Node.js
26mZero-dependency CLIs with Node.js
27mHTTP/2 with Node.js
25mFaster than C? Parsing Node.js Streams!
22mImplementing a performant URL parser from scratch
27mNode.js 12: A Decade of Node.js
13mBrewing JavaScript: Compile your own domain-specific language to JavaScript
