CleverCloud / kawa

Agnostic representation of HTTP1 and HTTP2, with zero-copy, made for Sōzu.
https://crates.io/crates/kawa
Apache License 2.0
18 stars 2 forks source link

Move simd under a feature flag, use fast CharLookup if not enabled #6

Closed Wonshtrum closed 1 year ago

Wonshtrum commented 1 year ago

SIMD makes parsers 2 times faster in "pre-body phase". But it uses x86-specific instructions, making it not compilable on other architectures (see #4). This commit:

This also allows for other architecture-specific optimizations by declaring other suffixed functions and adding them to the "_fast" suffixed ones with a feature flag.