Re: [VOTE] Scalar Type Hints
| From: | Nikita Popov | Date: | Sun, 15 Feb 2015 18:50:50 +0000 |
| Subject: | Re: [VOTE] Scalar Type Hints | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82736@lists.php.net to get a copy of this message | ||
On Sun, Feb 15, 2015 at 7:43 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> Hi Anthony,
>
> If you are working on JIT, you should understand that declare() switch to
> strict typing can't improve anything, because it works on caller side and
> in each function you now will have to generate code for both weak and
> strict checks.
>
Why do these checks have to be generated in the function, instead of
performing checks/casts at the call-site? Naively I would assume this to
perform better, because you can make use of type-information around the
call-site to elide checks/casts. Or does this have adverse effects due to
larger code size or something like that?
Nikita