Re: Re: Zend JIT Open Sourced
| From: | Rowan Collins | Date: | Fri, 27 Feb 2015 16:20:30 +0000 |
| Subject: | Re: Re: Zend JIT Open Sourced | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-84025@lists.php.net to get a copy of this message | ||
Dmitry Stogov wrote on 27/02/2015 15:56:
On Fri, Feb 27, 2015 at 6:40 PM, Jordi Boggiano<j.boggiano@seld.be> wrote: On 27/02/2015 15:19, Andi Gutmans wrote:This reminds me of an idea I had a while ago - with OpCache, and potentially JIT, relying on shared memory for optimisations, command-line scripts (e.g. background processing via cron or supervisord) are getting left behind in terms of performance. So I wonder if it would be possible to implement a "FastCLI" application server similar to FastCGI, which could be sent multiple requests representing POSIX command invocations, and serve them from a threaded environment. So instead of "php composer.phar install", you'd run "php-fastcli --port 55555 composer.phar install", which would "attach" to a running FastCLI server. Has anyone ever looked at such a thing? It seems like it would be useful for other languages as well, in exactly the way FastCGI is. Regards, -- Rowan Collins [IMSoP]Do you have a one line summary of why it's useless for real world applications? Is it just because they don't do enough number crunching compared to I/O or is it a matter of the JIT not kicking in fast enough to improve things in a single request cycle? It's not a single request cycle. JIT integrated into opcache, it compiles php script(s) of first access and stores code in shared memory. On following requests precompiled code is executed directly from shared memory.On Feb 27, 2015, at 7:12 AM, Anthony Ferrara<ircmaxell@gmail.com>Yes I think we can definitely do that. It is an interesting experiment and clarified also that JIT was less interesting in the short term as we can all observe by the fabulous results of the current PHP 7 runtime. But absolutely worth discussing post 7 as there surely are interesting opportunities.wrote: Dmitry and Zend, Thank you for sharing your code. I look forward to playing with it. Perhaps after 7 stabilizes (and ships) you could write up your thoughts around it? Why decisions were made and the findings that you have?