> Just a plug / reminder that Joe Watkins already wrote a parallel code

Library **parallel** uses a trick to run code in another thread. It
clones the function’s opcodes, including the static vars, which is a
known PHP Engine behavior. In this case, the function runs inside a
completely separate Zend VM.

For true parallelism, the following changes are needed:

1. Shared opcodes
2. A new memory allocator
3. A new GC similar to Go’s
4. Virtual threads (what FrankenPHP is doing now)
5. Possibly something else…

Before starting the TrueAsync project, I tried to consider the
possibility of implementing full parallelism, but ultimately I
assessed the implementation cost as “impossible.”
In addition, pure parallelism does not provide more performance (and
sometimes even performs worse) for a web server than concurrency.

Reply via email to