Hacker News new | ask | show | jobs
by zmxz 746 days 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.

1 comments

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.

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 :)

As a part-time contributor on FrankenPHP, from fixing bugs on PHP-src, and implementor of RFCs, I can assure you: I know what I'm talking about.

> Creating a few thousand "new object" takes less than 5 msec.

It depends on what you're doing in the constructor as to how long it takes.

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

No, it doesn't work anything like FPM. Like, at all. There's basically nothing in common between FPM and FrankenPHP. (at least until I merge this next PR for non-worker requests that makes it work like FPM for non-worker requests)