- macOS High Sierra Verseion 10.13.4
- Mac min (Late 2014)
- 2.8 GHz Intel Core i5
- 16 GB Memory
- Rust nighty 2018-04-11
httparse: https://github.com/kamyuentse/httparse/tree/37b77afb394536ad316753fe6a894c2a62f45c53
picohttparser: https://github.com/kevinswiber/picohttpparser-sys/tree/b590c6e1a1e83fab70feea92899043c7d275949d
PR of httparse with SIMD: seanmonstar/httparse#38
Bench with RUSTFLAGS="-C target-feature=+avx2,+bmi" cargo bench --features=nightly
httparse with AVX2 and picohttpparser with SSE4.2.
test bench_httparse ... bench: 279 ns/iter (+/- 74) = 2519 MB/s
test bench_picohttpparser ... bench: 209 ns/iter (+/- 43) = 3363 MB/s
Bench with RUSTFLAGS="-C target-feature=+sse4.2,+bmi" cargo bench --features=nightly
Both httparse and picohttpparser enable SSE4.2.
test bench_httparse ... bench: 321 ns/iter (+/- 62) = 2190 MB/s
test bench_picohttpparser ... bench: 211 ns/iter (+/- 10) = 3331 MB/s