Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84025 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14229 invoked from network); 27 Feb 2015 16:21:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 16:21:07 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.177 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:41551] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/3B-32582-27990F45 for ; Fri, 27 Feb 2015 11:21:06 -0500 Received: by widex7 with SMTP id ex7so1366679wid.0 for ; Fri, 27 Feb 2015 08:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=6Ke8t0AGKGypxoTdxImtS8G1Xs/UB0Zsntk6oWRIbu0=; b=yzkbpmewyBe2cG7ReIbxkr+4lV3viYby+RIYZGwGuDFd6KkWs4iTPGPW0dDPUpuOe3 BZyKuZ6VIeM/zmae/+REbbGMmCBPe9ul+OKoCZzSXwIYzDLIeG8AK9gapVLgQ8MCtovq Ekxdy7JM9sAcJQoEB7Kg0ueBJgQu3gYalICRdiAWbiii/iDES8l9VIvDNtENJxlgtuKV ItVtsi2le3Ywxcl4/L5fO0c48zpXPn3l6sJxtenkeYtlOWxUIhHAgBmX+YuQAgJZYIxh RJCvQuVnLBhSg6GVN4AMXxqhiU0BATg7HxZq/H0mE+QYrYIHfpLqH6Z6yPlPUs8IyGZ9 1Fsg== X-Received: by 10.180.77.233 with SMTP id v9mr8242876wiw.28.1425054063493; Fri, 27 Feb 2015 08:21:03 -0800 (PST) Received: from [192.168.0.136] ([62.189.198.114]) by mx.google.com with ESMTPSA id lj13sm3468449wic.9.2015.02.27.08.21.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 08:21:02 -0800 (PST) Message-ID: <54F0994E.5050207@gmail.com> Date: Fri, 27 Feb 2015 16:20:30 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54F08FF3.3040404@seld.be> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Zend JIT Open Sourced From: rowan.collins@gmail.com (Rowan Collins) Dmitry Stogov wrote on 27/02/2015 15:56: > On Fri, Feb 27, 2015 at 6:40 PM, Jordi Boggiano wrote: > >> >On 27/02/2015 15:19, Andi Gutmans wrote: >> > >>> >> >>> >> On Feb 27, 2015, at 7:12 AM, Anthony Ferrara >>>> >>>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? >>>> >>> >>> >> >>> >>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. >>> >> >> > >> >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. 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]