Benchmarks
These are my numbers, from one machine. They come with the corpus, the versions and the commands, so you can run them on yours and tell me if they don't hold.
Every figure here is a project benchmark: I ran it, on an Apple M2 Max (12 cores, 32 GB), macOS 26.7, and nobody independent has checked it yet. Each section says when it ran. The full tables, every page and the raw output are on the Benchmarks and Real-world benchmarks pages, and How it's measured has the method. Where Parsec loses, it's here too.
Thirteen real pages
Snapshots of Wikipedia, MDN, GitHub, the BBC, Hacker News, Stack Overflow, the Python docs, the New York Times, Reddit, eBay and the HTML Standard, 24.36 MB in all, parsed from memory with scripting off. Run on 15 November 2026.
| Parser | MB/s | Parsec vs |
|---|---|---|
| Parsec | 370 | |
| Lexbor 3.0.1 | 242 | 1.53× |
| html5ever 0.40.1 | 82 | 4.51× |
Parsec is ahead on all thirteen and holds less memory than Lexbor on every one. It doesn't on memory against html5ever, though: on BBC News, the New York Times, Reddit and eBay, html5ever's tree is smaller.
The web as a crawl found it
Hand-picked pages flatter whoever picked them, so this run takes 1,731 production pages, 558.6 MB, as Netweir's crawler fetched them on 21 November 2026: raw bytes and the server's charset, every encoding and size the web sent.
| Parser | MB/s | Median page | Peak memory |
|---|---|---|---|
| Parsec | 933 | 0.20 ms | 101 MB |
| Lexbor 3.0.1 | 523 | 0.35 ms | 123 MB |
Neither crashed or timed out, and both built the same number of elements on every page. Lexbor was faster on 13of them, nearly all small. html5ever's process peaked 2 MB lower than Parsec's.
A crawler's bad day
The final boss is 1,000 pages built from a seed: broken fragments, pages whose <meta> lies about their encoding, and the odd 25 MB table. It asks whether anything falls over and what the whole batch costs. Run on 20 November 2026.
| Parser | Seconds | Slowest page | Peak memory |
|---|---|---|---|
| Parsec | 1.02 | 0.163 s | 516 MB |
| Lexbor 3.0.1 | 1.94 | 0.247 s | 952 MB |
| html5ever 0.40.1 | 5.99 | 0.804 s | 708 MB |
No crashes, timeouts or refused pages from any of the three.
Hostile input
Eight inputs built to hurt an HTML parser: thousands of unclosed tags, misnested formatting, the adoption agency algorithm at its worst. Parsec is ahead on all 8. The widest gap is 80,000 unclosed <div>s, where Lexbor's work grows with the square of the depth: Parsec parses them at 131 MB/s, and Lexbor takes 5.2 s a parse, html5ever 8.8 s. Run on 15 November 2026.
Selectors
32 CSS selectors over the same thirteen pages: Parsec takes 226 ms for all of them and Lexbor 728, so Parsec is 3.22 times as fast and ahead on every selector. html5ever has no selector engine of its own, so it isn't in this one. Run on 15 November 2026.
URLs
Every href and src on those pages, 83,113 links, each resolved against its page: Parsec takes 107 ns a URL, Ada, the parser inside Node.js, 142, and Lexbor 243. All three agree on every one. Run on 18 November 2026.
CSS
Ten real stylesheets, 1.87 MB, Bootstrap and Bulma among them. Tokenizing, Parsec does 389 MB/s, Servo's cssparser 318 and Lexbor 210. Parsing every block, it's 211, against 196 and 112. Lexbor also parses the values of the 105 properties it knows in that run, which is more work, so read its parsing figure with that in mind.
Decoding
Real pages transcoded to Shift_JIS, windows-1251 and GBK, decoded to UTF-8: Parsec at 8 to 10 GB/s, Lexbor at 240 to 377 MB/s. Lexbor's figure includes encoding its output to UTF-8, since it decodes to code points. Its decoders on their own, before that step, beat Parsec's on dense GBK text.
JavaScript
11.58 MB of real JavaScript: react-dom, three.js, typescript.js and every page's inline scripts. Parsec's parser does 380 MB/s, oxc_parser 363 and swc 147, with less memory than either on every source. Run on 28 November 2026.
That total hides where oxc still wins. On the smallest inline scripts, each parse's fixed cost counts most, and Parsec is behind:
- mdn-html, 0.3 KB: 0.79× oxc's speed
- python-stdtypes: 0.81× oxc's speed
- whatwg-parsing, 0.2 KB: 0.84× oxc's speed
The lexer alone is further behind: 347 MB/s against oxc's 568, ahead of swc's 328 (run on 22 November 2026). Closing the gap needs a smaller token type, which changes the public API, so it's planned for 0.4.0 in #190.
Run it yourself
The whole HTML run takes about five minutes. You need CMake and a C compiler for Lexbor and a C++20 compiler for Ada; then it's three commands, on How it's measured. If your machine disagrees with mine, open an issue with your output. That's worth more to me than any number on this page.