Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92878 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51684 invoked from network); 28 Apr 2016 17:39:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Apr 2016 17:39:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.215.54 mail-lf0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:33517] helo=mail-lf0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/B4-28296-9DA42275 for ; Thu, 28 Apr 2016 13:39:38 -0400 Received: by mail-lf0-f54.google.com with SMTP id y84so92245549lfc.0 for ; Thu, 28 Apr 2016 10:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=5EGjdJ+vXk8crjHWr3lOT+l3yYzc+P2iXDyoMi1g19U=; b=GQi619f1Xp8DKQ2SypA4deOFDbBMGTM/MZAWdQRwi1fok8IVlTPTTbi5GbQsqB2PGs 0AAwXcEmII5SpGvRkbdfvHfrtBRWphwUZGyvUaT+BS8lSntvAlRFI8rj8iqnqP/Jtmnc jmUPEUZocDnbqdVywdUytN6KsRRdg0iAMQdQetELBAUaftH39lQP0UwW/GhsX82mkU1z 6b/yGrdNBtr2wfinstguz/f2otPxIpThVL5nuRc/Wna7jffKetotH9v9JLXKcK9zLsFP Mp9ZnDQeEnX+XsHQ5iVjOy0tTtcydZGKXRf/TUEbXyhvct8GkwxCHShgK7c8GXyrp+FD hBpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=5EGjdJ+vXk8crjHWr3lOT+l3yYzc+P2iXDyoMi1g19U=; b=M5VgcZbsGkQ38ZiP05zggjJCWaJuYG0NE2aO/c8gCgyXF7PCAUEwMu+YSRDzfJpNng GDEcYp2M0i3ldycB6JysuFCHTND+vnfL3lAfReZIK6H7TMUXU+sKgrT/rZyAzHLRoKHL T4vCuhQKBwjzMMBtgfDuGNISOmowI5NjA7UfYzIAspA7ZKOrWH3SINmn6j8Hm5rtp5Jr soeh4eW0sPSfDr54xGOvzSaPmey3vVINbTzhjaJJjv0XLiB4lmckMn8kteeGCMYfAHFm r5Xje9MB0DTAP9eujTRKAMTY1VrmFI1/Hs4X0D6ABagTSL6NU6c/erIti+nPWYde0Gvj xifw== X-Gm-Message-State: AOPr4FWDC/bO+FdKquENhpiXg74C29+I1q1T2RNGLNRnd1EL67bs1HCrCICswECzfsEm/lVE4VfJsNU0x61ZIQ== MIME-Version: 1.0 X-Received: by 10.112.135.230 with SMTP id pv6mr6723110lbb.68.1461865174324; Thu, 28 Apr 2016 10:39:34 -0700 (PDT) Sender: php@golemon.com Received: by 10.112.19.74 with HTTP; Thu, 28 Apr 2016 10:39:34 -0700 (PDT) X-Originating-IP: [107.198.91.68] In-Reply-To: References: Date: Thu, 28 Apr 2016 10:39:34 -0700 X-Google-Sender-Auth: Fr7bRpExjdsk7ijH0Tzkj64m-9M Message-ID: To: Dominic Grostate Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Inline functions From: pollita@php.net (Sara Golemon) On Thu, Apr 28, 2016 at 1:21 AM, Dominic Grostate wrote: > 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? > I'm actually working on a proof-of-concept of that already. I've already got basic proxy methods getting inlined, and am working up through expression methods and trying to resolve scoping with $this and non-publics. I'll publish a branch on github when I have something interesting to share. -Sara