~/talk

Implementing a performant URL parser from scratch

Talkat Conf42 JavaScript 2022 · on Thursday, 2022-11-17· [javascript, webassembly]
slides:none on file

Reimplements Node.js URL state machine and parser, porting the original C++ design into Rust and WebAssembly and then into a pure JavaScript version released as github.com/anonrig/url-js. Codebase is ~2,000 lines, runs >800 benchmarks and 733 Web Platform Tests, achieving 99.9% spec compliance. Rust+Wasm prototype shows significant Wasm/encoding overhead; the JS parser is about 5–6x faster than an existing JS library but remains ~95–96% slower than the native C++ implementation.

AI-written summary · about

  1. 0:00URL parsers and performance
  2. 2:24Why URL parsers matter
  3. 5:30URL parsing state machines
  4. 8:19Node.js URL parser issues
  5. 10:04WebAssembly vs Rust for parsing
  6. 13:15JavaScript for faster parsing
  7. 15:23Optimizing JavaScript code
  8. 18:34Spec compliance vs performance
  9. 20:21Benchmarking results
  10. 21:25Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.