I've been optimizing a PHP server written in C, here's what makes it fast

The first-of-its-kind WebServer for asynchronous PHP, written in C, where the server itself is deeply integrated with the PHP VM.

The whole request lifecycle (parse, dispatch, respond) happens on a single thread. Same model as NGINX, Node.js, or Rust's Tokio: one thread owns the connection and the request end to end. There is no handoff between an accept thread and a worker thread, no locks, no context switches.

submitted by /u/edmondifcastle
[link] [comments]