There is an assumption that HTTP parsing in Amphp might affect overall server performance.
The assumption is based on experimental results. The variant of pure TCP Amphp server without HTTP parsing performs closer to Swoole and faster than Nodejs.
HTTP parsing implemented with PHP PECL Regexp can be replaced with bind C or Rust library via FFI or Wasmer extension.
Possible fast parsing libraries are:
- https://github.com/seanmonstar/httparse/
- https://github.com/h2o/picohttpparser
Libraries benchmark: https://github.com/rust-bakery/parser_benchmarks/blob/master/http/README.md