Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24037 invoked from network); 23 Feb 2015 01:45:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2015 01:45:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.46 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.215.46 mail-la0-f46.google.com Received: from [209.85.215.46] ([209.85.215.46:35761] helo=mail-la0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/25-33016-5368AE45 for ; Sun, 22 Feb 2015 20:45:26 -0500 Received: by labgm9 with SMTP id gm9so15856411lab.2 for ; Sun, 22 Feb 2015 17:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JeJ6h0uqcyVnKk0IET2pZwWOkHnnFZit7+l1ompap1I=; b=slENfvdpYAy+nQPc1EaowrX8iQ55qV+5XnGu45LH+BsEEYLFqybyWw494RAf3xc15v nH6kO31EjjzkieTGnXB8j6n5tLKG5ckljHqOfxCipf/DQA0mCK2Dh0nNVzeeV1LyDCKu E6QO/tbUmOFGNb9QvVEq4ngacPhEx4i5J7fF4L+nJ/K90SmXxWnW66OMZE+D+JLM8Dh1 M43QwTio+BJtVY/5SUiSmB5YBF2HN/BeJ9okecWzYY30EGXUUZZX1LdHbusdM/YOOaQj F0pRdU1nSbDmPT9QHOE5mVG/xeBlK8nhjIM8zt3k1IcoWj5O85OnLY2jeeo2VO1IaXGr iYlw== MIME-Version: 1.0 X-Received: by 10.152.28.73 with SMTP id z9mr7746766lag.28.1424655922607; Sun, 22 Feb 2015 17:45:22 -0800 (PST) Received: by 10.25.43.9 with HTTP; Sun, 22 Feb 2015 17:45:22 -0800 (PST) In-Reply-To: <54EA83E4.1030107@gmail.com> References: <2e4694f9805ee81ea0b2c79eab06c2d6@mail.gmail.com> <83921f861c3378dfc6ea34b6681f2edd@mail.gmail.com> <26a5bb62bd37a3f610b2a6c10f84d855@mail.gmail.com> <6d317b6cce0cc1aaded1dae11218234d@mail.gmail.com> <7d58f9b893c257c7289166b31bbdd9ac@mail.gmail.com> <54EA83E4.1030107@gmail.com> Date: Sun, 22 Feb 2015 20:45:22 -0500 Message-ID: To: Stanislav Malyshev Cc: Zeev Suraski , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] JIT (was RE: [PHP-DEV] Coercive Scalar Type Hints RFC) From: ircmaxell@gmail.com (Anthony Ferrara) Stas, On Sun, Feb 22, 2015 at 8:35 PM, Stanislav Malyshev wrote: > Hi! > >> The difference though is the journey. The static analyzer can reason >> about far more code with strict types than it can without (due to the >> limited number of possibilities presented at each call). So this >> leaves the dilema: compiled code that behaves slightly differently >> (what Recki does) or whether it always behaves the same. > > Wait, so are you saying that advantage of having strict typing in PHP > core is that some analyzer - which does not share code with PHP core, > AFAIU - if it interpreted PHP types in strict manner and provided > warnings where types it can statically deduce do not match and the > authors of the code agreed with its suggestions and rewrote their code > so that the analyzer would not complain, would in some cases result in > code that might be JIT-optimized more efficiently? > > That is not a claim about strict typing in PHP core having any benefit > at all. I'm not sure even this claim is true (as adding (int) doesn't > actually improve performance - it just shifts around the place where the > conversion is done, and once conversion is done, you can do the same > optimizations as before) - but even if there's some situation where it > is true, I don't see how it makes difference for PHP core (even in > situation of "PHP core + JIT extension" or "non-Zend PHP runtime with > AOT/JIT"). Please don't twist my words. Look at everything I said, don't take one statement from one very specific topic out of context as some sort of proof that there are no benefits. Anthony