top | item 40521296

(no title)

zmxz | 1 year ago

It doesn't even depend. The underlying engine that executes opcodes is the same. Minimal speedup from not having to execute several "new objectname" commands isn't even a drop in the sea when it comes to what servers do.

I, for one, would love to be wrong about this and that FrankenPHP with all the other alternative runtimes actually brought benefits.

discuss

order

withinboredom|1 year ago

It absolutely does depend and "several new" might be "thousands new". It literally depends on what you're doing.

> The underlying engine that executes opcodes is the same.

Not exactly. FrankenPHP uses a ZTS build of PHP, which includes thread-support. Meaning you can actually spawn real-life threads in your PHP code with just a bit of work.

I've actually been working on a Parallel drop-in replacement that uses FrankenPHP/go instead of maintaining its own thread system.

zmxz|1 year ago

It's obvious you have no idea what ZTS build of PHP does and you're just spewing nonsense at this point.

Creating a few thousand "new object" takes less than 5 msec. Test it. I have.

FrankenPHP uses a Go-based balancer that distributes requests to array of pre-started workers. Just like PHP-FPM does.

If you already used PHP's parallel extension, then you should at least know the difference between thread and process instead of typing buzzwords, thinking it makes you look cool if you use them :)