Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96611 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99241 invoked from network); 26 Oct 2016 10:50:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Oct 2016 10:50:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:33020] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/88-24108-65A80185 for ; Wed, 26 Oct 2016 06:49:58 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id C1899784A6F; Wed, 26 Oct 2016 12:49:55 +0200 (CEST) Received: from w530phpdev (p54A77119.dip0.t-ipconnect.de [84.167.113.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1123647.serverkompetenz.net (Postfix) with ESMTPSA id 853B7784A6B; Wed, 26 Oct 2016 12:49:53 +0200 (CEST) To: "'Dmitry Stogov'" , "'PHP internals list'" Cc: "'Zeev Suraski'" , "'Xinchen Hui'" References: In-Reply-To: Date: Wed, 26 Oct 2016 12:49:49 +0200 Message-ID: <03e001d22f76$af148650$0d3d92f0$@belski.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQH7zWb7xb842b4LLn7awYuyPa4DVaBmH1HQ Content-Language: en-us Subject: RE: [PHP-DEV] JIT for PHP project From: anatol.php@belski.net ("Anatol Belski") Hi Dmitry, > -----Original Message----- > From: Dmitry Stogov [mailto:dmitry@zend.com] > Sent: Thursday, September 1, 2016 1:57 PM > To: PHP internals list > Cc: Zeev Suraski ; Xinchen Hui > Subject: [PHP-DEV] JIT for PHP project > > Hi @internals, > > I'm glad to say that we have started a new JIT for PHP project and hope to > deliver some useful results for the next PHP version (probably 8.0). > We are very early in the process and for now there isn't any real performance > improvement yet. So far we spent just 2 weeks mainly working on JIT > infrastructure for x86/x86_64 Linux (machine code generation, disassembling, > debugging, profiling, etc), and we especially made the JIT code-generator as > minimal and simple as possible. The current state, is going to be used as a > starting point for research of different JIT approaches and their usability for PHP. > > The code is available at: https://github.com/zendtech/php-src/tree/jit- > dynasm/ext/opcache/jit > > The sources may be built and tested as regular PHP (no any special external > dependencies required). > JIT itself is implemented as a part of Opcache. > You may try it in action: > > sapi/cli/php -d opcache.jit_buffer_size=32M Zend/bench.php sapi/cli/php -d > opcache.jit_buffer_size=32M -d opcache.jit_debug=1 Zend/bench.php 2>&1 | > less > > As I mentioned we didn't try to achieve any real performance improvement yet, > although we do currently see 20% speedup on bench.php, but a bit of a > slowdown on real-life apps. > > Wish us luck :) > I just wanted to ask about the status. After starting to do some basic work https://github.com/zendtech/php-src/compare/jit-dynasm...weltling:jit-dynasm I've stumbled upon a couple of things - in zend_elf.c, the current binary that loads php is being read in, I guess this part needs to be ported to parse the Windows COFF format - with DynASM, seems zend_jit_x86.dasc will need to be extended for some compatibility, please correct if I'm wrong Regarding these, maybe you've one or another tip for me? Is this still relevant? Or I jump into it too early? Thanks anatol