Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84037 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47174 invoked from network); 27 Feb 2015 19:20:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 19:20:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.178 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.178 mail-vc0-f178.google.com Received: from [209.85.220.178] ([209.85.220.178:46667] helo=mail-vc0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/E0-32582-F83C0F45 for ; Fri, 27 Feb 2015 14:20:48 -0500 Received: by mail-vc0-f178.google.com with SMTP id hq11so7012831vcb.9 for ; Fri, 27 Feb 2015 11:20:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Hp2CvsHmdLmWVfsTZhn6jo9EbsYV7lzUTrdIWS9wgV0=; b=g/z8W6wD8/VqQbs10/zwACzsy91NOGnvIWOYtiN69qp4hJ/F0GdidVK22XBSrv6FsU z3YTINNYM0bbE4nTFFALgBhGxtzCOHHJyfKfyDrrpZselJ1IiMaY+cq1bCnfDwWjifPA PU3ghK0mYUrkSs2Wauc2enyjMaFhCJ9J7w79nocqFXtErCUCWbbhr9e6dtYRvb6kWuTs ein8790nJcnJnFXQYl2CEUCnkyD3GS5OMxJ6Mx1QXoHEH5fvS5p8wNz7DS+ZqeCnZMF/ NrcGkzvdDuuX/ZcmXtTCDAY9RK4IZJGPuvg9obRHcmW4mVb3atDQFd+B6Sd/aENuIFJC zmjw== X-Gm-Message-State: ALoCoQlpAXVS50HjLTyMt+WRlUWmFzR5yI4qiJy5J1Qp0oZP9x6I2luN3d2dGfoEjn3q7qdr4Tt8OK7qnvdWtjZ+iqlXLRZQZoDCcF4peZbtpBa2gWY/mht8zuos4TM207uIJJGLxu85b9JmopjiFluVtRjTuXOL3Q== MIME-Version: 1.0 X-Received: by 10.52.52.136 with SMTP id t8mr14181350vdo.49.1425064844740; Fri, 27 Feb 2015 11:20:44 -0800 (PST) Received: by 10.52.113.231 with HTTP; Fri, 27 Feb 2015 11:20:44 -0800 (PST) In-Reply-To: References: <54F08FF3.3040404@seld.be> <63262a9c0edd51bbf38df2a00c87340e@mail.gmail.com> Date: Fri, 27 Feb 2015 23:20:44 +0400 Message-ID: To: Anthony Ferrara Cc: Zeev Suraski , Jordi Boggiano , PHP Internals Content-Type: multipart/alternative; boundary=089e0115f048da5fdb051016c386 Subject: Re: [PHP-DEV] Re: Zend JIT Open Sourced From: dmitry@zend.com (Dmitry Stogov) --089e0115f048da5fdb051016c386 Content-Type: text/plain; charset=UTF-8 On Fri, Feb 27, 2015 at 9:55 PM, Anthony Ferrara wrote: > Zeev, > > >> Right now it compiles script (php file) at once. > >> So yes, our JIT uses some kind of AOT approach, but completely > >> transparently for the rest of PHP. > > > > Just to slightly further clarify - we don't compile the whole codebase at > > once, but we keep the existing semantics that every file is independent, > may > > change independently of other files, and include() may end up load one > file > > in one flow and another one in another flow. There's isn't any > cross-file > > optimization. > > > >> We also tried few different approaches to collect formation about hot > >> functions and generate code only for them. > >> Unfortunately, this didn't change the picture. > > > > (again, the picture being no performance gains in common Web apps). > > Well, I just want to make one clarification here to your point: > there's no performance gains to this AOT approach for common web apps. > > It's not really fair to judge a true JIT implementation based on this > because it lacks crucial runtime information that a real JIT compiler > would have (such as input types, values, etc). So it would be left > generating generic native code instead of specific code. I just want > to point out that the results here aren't really applicable to a JIT > approach. And that should be made clear when discussing it. > Nobody talk about JIT in general, only about this PoC. And yes, some other approaches may provide better gain. At least I think so. However, we may just guess, until implement them. > That's not to say there's anything wrong with this approach, nor that > there isn't a ton we can learn from it. I think it's a fantastic > research effort and plan on digging through it myself. Thank you for > open sourcing it. > Thanks for good words :) This work may be adopted for some specific cases. 25-30 times speedup on Mandelbrot allows usage for numeric calculation instead of C. https://gist.github.com/dstogov/12323ad13d3240aee8f1 anyone may repeat the language battle :) Thanks. Dmitry. > > Anthony > --089e0115f048da5fdb051016c386--