Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79264 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9205 invoked from network); 28 Nov 2014 08:23:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Nov 2014 08:23:27 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.171 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.171 mail-vc0-f171.google.com Received: from [209.85.220.171] ([209.85.220.171:63255] helo=mail-vc0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/77-59154-9F038745 for ; Fri, 28 Nov 2014 03:23:22 -0500 Received: by mail-vc0-f171.google.com with SMTP id hy4so2778295vcb.2 for ; Fri, 28 Nov 2014 00:23:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=nYFn4Evhj2Qg2/+7kMFUfd84ZvzBu41Yt21XR8pLwGA=; b=SxEmVRu5SI712/g2XO19m8oq8zi1sSFAoWkvyC34qkAYnpEqCtyFdmTABFxDHoJUMl 1QKTUOfYtGO5n82K/XGxnWRjC7IUFMhPRCmCsl1WEFk/ME+LLu5jae4elFJ6fRL62wMt HK6oM/u4xeAd+fKfpGciokCzfFXwZpp0SO5t4nfQAjRBssdEPEHbvcs6+XGIc+bBlRX1 QylFE6cCe8WpWIwLU7WS8+TpZ3o3Eo5AjQfctDaDB+6Y/35e1Qw/jRC9W39c038hhooz TIZAnRQe10izjZMFYDMa8+HLEv1nTWrLZcae5nF21tcgtwfYwnKZ1icJ8BcO1ktEbH0S Rawg== X-Gm-Message-State: ALoCoQmFYIlqz4QNVsC3YEStj838K3iXrpdk8J4vumwTV8dra0wlFH+vPDbCzqFnRlys96OUm3TnSKaee7F3yB7mlgDIyAEXV7cUnfFaWNFE4UAS7f7ymeoAL819ZGAOcROsZ29gdhe0+1/IpqKx4Kdd4B6VgjxiEg== MIME-Version: 1.0 X-Received: by 10.53.10.65 with SMTP id dy1mr18389549vdd.51.1417162999453; Fri, 28 Nov 2014 00:23:19 -0800 (PST) Received: by 10.52.176.231 with HTTP; Fri, 28 Nov 2014 00:23:19 -0800 (PST) In-Reply-To: References: Date: Fri, 28 Nov 2014 12:23:19 +0400 Message-ID: To: Xinchen Hui Cc: Nikita Popov , Matteo Beccati , PHP Internals Content-Type: multipart/alternative; boundary=001a113659d02bf69f0508e6f909 Subject: Re: EX(scope) removing From: dmitry@zend.com (Dmitry Stogov) --001a113659d02bf69f0508e6f909 Content-Type: text/plain; charset=UTF-8 On Fri, Nov 28, 2014 at 7:33 AM, Xinchen Hui wrote: > Hey: > > On Fri, Nov 28, 2014 at 1:27 AM, Dmitry Stogov wrote: > > Hi, > > > > I'm working on call/return sequence optimization. As part of this work > I'm > > minimizing the size of call frame (zend_execute_data) and number of > > read/write operations on call/return. > > > > Could you please take a look into the patch that removes EX(scope) > > https://gist.github.com/dstogov/5ad50d582346385d587e > committed. > All phpt tests are passed, but I'm not completely sure about one line - > > > https://gist.github.com/dstogov/5ad50d582346385d587e#file-ex_scope-05-diff-L193 > > > > On the other hand I can't imagine what it may break. > neither do I. > > > > > Matteo, can you please run your test suites with this patch. > > > > PS: I'm also going to: > > - pack EX(num_args) into reserved space of EX(This) > done. > > - try to get rid of EX(frame_info) > done. > > - try to merge EX(called_scope) and EX(This). Only one of them matters. > > - try to replace zval EX(This) with a pointer to zend_object EX(object) > > Hmm, EX(This) is not like EX(object), it will be accessed by vm > handler: get_obj_zval_ptr_unused > > it suppores to return a zval * there. if EX(This) became a zend_object > *, then we may face different handlers for IS_UNUSED and other types > :< > Yes, I know. After the latest changes it doesn't make a lot of sense to replace ZVAL with ZEND_OBJECT*, because other data is already packed into the same ZVAL and it won't save any memory. Also zend_execute_data structure is aligned on zval boundary (16 bytes), so it makes sense to save another 16 bytes, but saving 8 bytes won't affect VM stack memory consumption. Thanks. Dmitry. > > thanks > > > > > Thanks. Dmitry. > > > > -- > Xinchen Hui > @Laruence > http://www.laruence.com/ > --001a113659d02bf69f0508e6f909--