Skip to content

rewrite in rust#89

Draft
anonrig wants to merge 3 commits intomainfrom
yagiz/rewrite-rust
Draft

rewrite in rust#89
anonrig wants to merge 3 commits intomainfrom
yagiz/rewrite-rust

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented Mar 28, 2026

Benchmark results

Measured on the same 11-URL corpus as the README (808 bytes total).

Implementation parse can_parse
C++ backend (README baseline) 2.016 µs — 382 MiB/s 1.212 µs — 636 MiB/s
Pure Rust (stable, no feature flags) 1.503 µs — 513 MiB/s 0.454 µs — 1 697 MiB/s
Pure Rust + nightly-simd (std::simd, nightly only) 1.457 µs — 529 MiB/s 0.511 µs — 1 508 MiB/s
servo url crate 3.562 µs — 216 MiB/s
  • parse is 25% faster than the C++ backend (stable), 28% faster with nightly SIMD
  • can_parse is 2.7× faster than the C++ backend with zero heap allocations for any input
  • Both beat the servo url crate: parse by 2.4×, can_parse by a wide margin

@anonrig anonrig force-pushed the yagiz/rewrite-rust branch from cdf782b to 8cda201 Compare March 28, 2026 19:35
@anonrig anonrig force-pushed the yagiz/rewrite-rust branch from 8cda201 to bbbac06 Compare March 28, 2026 23:58
@anonrig anonrig force-pushed the yagiz/rewrite-rust branch from 44e22d4 to dbaf67d Compare March 29, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant