News for hackers. Stuff that matters.
Re:Unsafe at Any Speed: Tradeoffs and Values in the Rust Eco... by scns on Thursday January 25, 2024 @08:39PM (#39137945)
> Seriously, it should not be hard to efficiently strip a prefix off a u8 slice in safe Rust. For example, split_first.

That is a good idea for a contribution, no?

Re:Unsafe at Any Speed: Tradeoffs and Values in the Rust Eco... by andrewaylett on Friday January 26, 2024 @05:21AM (#39140958)
Re:Unsafe at Any Speed: Tradeoffs and Values in the Rust Eco... by andrewaylett on Friday January 26, 2024 @02:11PM (#39146702)
Follow up -- the benchmarks on that PR look poor, but the benchmarks don't actually quite measure what they're expected to measure -- they're not black-boxing inputs, so the compiler has an opportunity to constant-fold in some cases.

I raised a PR to fix the benchmarks: https://github.com/seanmonstar/httparse/pull/151