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