seanmonstar / httparse

A push parser for the HTTP 1.x protocol in Rust.
https://docs.rs/httparse
Apache License 2.0
584 stars 114 forks source link

refactor: Bytes inner arithmetic #138

Closed AaronO closed 1 year ago

AaronO commented 1 year ago

IMO cleaner pointer arithmetic avoiding unnecessary intermediate slices.

No perf gains in isolation but facilitates some (upcoming PRs)

This is conceptually easier to reason about, end is fixed, "start" and "cursor" advance monotonically