Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82736 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73133 invoked from network); 15 Feb 2015 18:50:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2015 18:50:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:65280] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/2A-06835-D8AE0E45 for ; Sun, 15 Feb 2015 13:50:54 -0500 Received: by mail-wi0-f174.google.com with SMTP id em10so21924226wid.1 for ; Sun, 15 Feb 2015 10:50:50 -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=JKUIuGC3Akj66d34SBsA6fZj0EcGjbDeqza5cne7IqQ=; b=JMVKlod3An9MeNOU1QMNyRSWwS1ShNzvx+rqJB0CTgvzprz+X+Z9ANtBDcy4e9Nwx1 P0uSqmB2TZolbRTWJ1VbQ645oUXDCjW3OuFswZ6lvjg6p1uxDXI7ir1ptdIUspDUxDt8 q4zhzBHRQTjImJXDhN5zfiCgKoPqrchvBFiGM9y23tbzMsYWeXmeAa//CJQoKaMUAXHr VdzDnPVzlSbC7t9u+tQsxNJ4ejRjZ1lys8bDAIdirty+sQgPKOQZkbu6bG3a1M+NuRqH bZyN4r6H4iOuH57Api/6kRpTbAKqQCxT48b91htItzjJ3nTJtgKCA5VHwKCJKa6gyE2O 5d5w== MIME-Version: 1.0 X-Received: by 10.180.189.52 with SMTP id gf20mr39231259wic.27.1424026250786; Sun, 15 Feb 2015 10:50:50 -0800 (PST) Received: by 10.27.10.168 with HTTP; Sun, 15 Feb 2015 10:50:50 -0800 (PST) In-Reply-To: References: <93453174-E6A8-47C6-8AB6-A08858A7FC05@zend.com> Date: Sun, 15 Feb 2015 19:50:50 +0100 Message-ID: To: Dmitry Stogov Cc: Anthony Ferrara , Zeev Suraski , Andrea Faulds , Patrick ALLAERT , PHP Internals Content-Type: multipart/alternative; boundary=001a11c34750d43ed2050f24f2b2 Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: nikita.ppv@gmail.com (Nikita Popov) --001a11c34750d43ed2050f24f2b2 Content-Type: text/plain; charset=UTF-8 On Sun, Feb 15, 2015 at 7:43 PM, Dmitry Stogov 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 --001a11c34750d43ed2050f24f2b2--