Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83524 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19493 invoked from network); 23 Feb 2015 01:35:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2015 01:35:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.52 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.52 mail-pa0-f52.google.com Received: from [209.85.220.52] ([209.85.220.52:45990] helo=mail-pa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/24-33016-8E38AE45 for ; Sun, 22 Feb 2015 20:35:37 -0500 Received: by pablf10 with SMTP id lf10so23437685pab.12 for ; Sun, 22 Feb 2015 17:35:33 -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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=pLR7JXZIul65uS13Y2un2IRLbtWfApbcbAx7uRaslyk=; b=wiwSTOBgH3/P/z+UdEfZyajPtRw13zELND2wqaADY4BEeeF1Su3wmKNJy5MMs6OkEh XlAWAntxT/8xmk/moDcbtVbyX5KdOCS0ADuL16JlUscEeZp69EZlK9lqUB2R0K4iXcBc M3vvCPvy3zyXgcbt76KocNI3WC+P+zFSbC5bLFqO8JeybwWRcrkJVtC6B/hhQ+xN7+XE Gjtjd5IQ6kE6B6FOrJRfYqUkhALPjh8dEiA+KTrJQNMQxafzDnUrp64QonS2irDzydGj Zp41PrApz5gJBb63wpdPa+0Tym5TvgU80CIlNi+qhxPF+WLvaS54wgspHxOSKLWoe1eq Z3Mg== X-Received: by 10.68.69.109 with SMTP id d13mr14919589pbu.152.1424655333755; Sun, 22 Feb 2015 17:35:33 -0800 (PST) Received: from [192.168.2.145] (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id pa6sm23996660pac.45.2015.02.22.17.35.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Feb 2015 17:35:33 -0800 (PST) Message-ID: <54EA83E4.1030107@gmail.com> Date: Sun, 22 Feb 2015 17:35:32 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Anthony Ferrara , Zeev Suraski CC: PHP internals References: <2e4694f9805ee81ea0b2c79eab06c2d6@mail.gmail.com> <83921f861c3378dfc6ea34b6681f2edd@mail.gmail.com> <26a5bb62bd37a3f610b2a6c10f84d855@mail.gmail.com> <6d317b6cce0cc1aaded1dae11218234d@mail.gmail.com> <7d58f9b893c257c7289166b31bbdd9ac@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] JIT (was RE: [PHP-DEV] Coercive Scalar Type Hints RFC) From: smalyshev@gmail.com (Stanislav Malyshev) 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"). -- Stas Malyshev smalyshev@gmail.com