Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92862 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1610 invoked from network); 28 Apr 2016 08:21:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2016 08:21:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=codekestrel@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=codekestrel@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.68 as permitted sender) X-PHP-List-Original-Sender: codekestrel@googlemail.com X-Host-Fingerprint: 74.125.82.68 mail-wm0-f68.google.com Received: from [74.125.82.68] ([74.125.82.68:35220] helo=mail-wm0-f68.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/23-14004-508C1275 for ; Thu, 28 Apr 2016 04:21:25 -0400 Received: by mail-wm0-f68.google.com with SMTP id e201so20557917wme.2 for ; Thu, 28 Apr 2016 01:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=Ib8K7U6QlwNzeh9Yybrk3cyDeXn3zuSqWem9L9oF0gA=; b=t1pFJxuefugIEpk96AQ91k1ssUuQeYIy7roZ9ZRdzqZdz6XJwzmHGH4ZdM68XVmDG0 VDb7OIhoDRvNgZKdWnXuWvmwlCxCEIVl0ELTp4116iyvnZL4sZ4srS0P9U6Lg6cCUq7f ZqHKvAnFxQ6ghjsBM0QRv+4VfhZC4Cgfn8aYXM1vVQsbiZ1q7Wt5rfHiVRVn6+9kd+Sn XRT7DRoRPS+2yIhxFw7aQXRSJLEFMr56PI9ErHFHGSxMql20CGCSnTWA8ic7zBJHwe42 TvbqdpL61RUXk8NefqatRZNmvXBfP8IxXEd9bOxvQ7J9ai3ZemOp5B+I7NYaebWoapvj HISw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=Ib8K7U6QlwNzeh9Yybrk3cyDeXn3zuSqWem9L9oF0gA=; b=T4hkEH3HWQ5uC7xVL7q2rfmVM3JRRa9958ffxIHuEnWMwCHINEcrze0QznyaVfg1h0 TfTZ4yIJAyS0xzaAJLwkClrelUO6qwia3hYf7ks9ITyGuKDesDFglguB756yNOyTHUV5 bArYayF55HRvB2o9mLmTs/Z3x8ofL7oNs8GnN63/S5Agop2tPVybcSIqmihe+1ZYcr08 wpis3l0xo160qoNCQ80GKSP/idRvvwBolkeIa2l6kPDPZdw3zIH/SICpd9NQk4Fhcxs+ pA0DBBRz8ov/OhjDJxHTKzTEIbeMbY+wI5st/sE6m23sqO/ph1UXjCF4LWYuFTCPTeWJ w2ig== X-Gm-Message-State: AOPr4FUath+D9AnnPKzoVtjgA7tCXJlu4ElZIiHLcYB0nFlL6jCzrteRkGHKMS7/WxsNxqXrNboxgQmaLRmOfg== MIME-Version: 1.0 X-Received: by 10.28.133.14 with SMTP id h14mr14924462wmd.100.1461831682213; Thu, 28 Apr 2016 01:21:22 -0700 (PDT) Received: by 10.28.140.10 with HTTP; Thu, 28 Apr 2016 01:21:21 -0700 (PDT) Received: by 10.28.140.10 with HTTP; Thu, 28 Apr 2016 01:21:21 -0700 (PDT) Date: Thu, 28 Apr 2016 09:21:21 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=001a1145e65423e0b60531873664 Subject: Inline functions From: codekestrel@googlemail.com (Dominic Grostate) --001a1145e65423e0b60531873664 Content-Type: text/plain; charset=UTF-8 Something in Dmitry's attribute RFC caught my attention. There is an example implying inline functions indicated by an attribute. I know that was only a potential use case for an extension. But it made me wonder how much that could improve PHPs performance if we actually had it. As I understand it, the process by which the call stack is updated and scope changed, is quite expensive. And from tests I can see that function calls do actually add a not insignificant overhead to intensive repetitive tasks. So how difficult would it be to get the engine to determine if an inline is feasible, then skip the fcall init, and dump the a functions opcode emits directly into the current scope? --001a1145e65423e0b60531873664--