Stas,

On Sun, Feb 22, 2015 at 8:35 PM, Stanislav Malyshev <smalys...@gmail.com> 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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to