Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88922 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38835 invoked from network); 22 Oct 2015 16:39:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2015 16:39:52 -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.223.169 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.223.169 mail-io0-f169.google.com Received: from [209.85.223.169] ([209.85.223.169:36129] helo=mail-io0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/92-18485-75119265 for ; Thu, 22 Oct 2015 12:39:52 -0400 Received: by ioll68 with SMTP id l68so97912891iol.3 for ; Thu, 22 Oct 2015 09:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zend_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ksBhvLmPwA2XEtQ5fJXFQGIiQoga7bNNE52CCRrYzeY=; b=adAmm2PWiKvDG0IYAr9c4vxTmDGcsQ9htQi+yY8Rg0SCsxuPQL0iczovpH4lgP6Fc4 SOZaZB7iJsIr5mR6C88OewDjLWbhK8oCRivqBhYxSiX5y7iXcIa809HbAYAI8CLRrMI/ +RbmTJlrHM39v9sQAZuqz0ql9Ojs0qg+PKlLXdoRY8nW4B/ZdMr9KhL+YFTiY/Z0nREb 7fSiv+CI3USW5jaLupO2CUHrX/jSzcEZL7/3bvNpBq6nIDaGwpXQwzuSJJOmUoal2yLP sH/lS3296JTu4h813+1pO/9F5i848BZX+P3HDzXGjngOJaTm+/x64yLYZFb1aLgXq3Hf 6Bzg== 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=ksBhvLmPwA2XEtQ5fJXFQGIiQoga7bNNE52CCRrYzeY=; b=F2H1rrBjuXje7cgHWCWHKrym94ZbMeE6L34cEvSkNbUGRxpIxbjc31v+gpqXmwAayz 99Ntc13+X9Nr8dreuKwxabelsGZsduSzG6syGF3ZIAaqADoJPTLF4BkLe++3R1cRSLPu yC4HM31GmdUjyTUEO64UzuBQd2yUrlGWuHYRj7IOccxPJ1d3m9Xxj0LVImGOowJN9Kfr ViGx1kJmXZRibU4M/7mlnZbvNVMn6vXc1UEorvVY6pKn+V2864HwQfLu82wIO2q9VW/S CKaiepqUe7WAH03Wm0NIAGVWLVQ8JEc5K8Eudb2PbjT9ZkbzJoelt/obGq0k7T5IeuwI 8ePg== X-Gm-Message-State: ALoCoQmnGAroeREB9siwJQeRalWjCJ0o2z0RZjnh0NeBl42MzmYH1871AFJE4m5fiAWSgXvUsm4ofe6/hMQ27ZDT8n1Cz05EYNnGvCmmoLxAb8ujFXqxG9VKgiHffA+rd0gGO1QC3AO70O2TpY0FacELcup05JCxk1dhoQLuNtXWSvlOIlnlMx8= MIME-Version: 1.0 X-Received: by 10.107.15.17 with SMTP id x17mr10712297ioi.196.1445531988942; Thu, 22 Oct 2015 09:39:48 -0700 (PDT) Received: by 10.50.73.166 with HTTP; Thu, 22 Oct 2015 09:39:48 -0700 (PDT) Received: by 10.50.73.166 with HTTP; Thu, 22 Oct 2015 09:39:48 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 Oct 2015 19:39:48 +0300 Message-ID: To: Lin Yo-An Cc: Laruence , Derick , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=001a113f1e20b67e7d0522b424f2 Subject: Re: [PHP-DEV] few questions about op_array From: dmitry@zend.com (Dmitry Stogov) --001a113f1e20b67e7d0522b424f2 Content-Type: text/plain; charset=UTF-8 On Oct 22, 2015 3:45 PM, "Lin Yo-An" wrote: > > Hi all, > > > I am looking into zend op_array structure, and few questions raised in my mind: > > 1. Why op_array->refcount uses *uint32 instead of uint32, is there a reason? if we can replace it with uint32, then we might save one emalloc call for memory allocation for every op_array allocation? We may have few different op_array structures with the same opcodes but with different names for example. So just uint32won't work. > > 2. There are also a lot of information saved in the op_array structure, if we can move line_start, line_end, doc_comments...etc into an external structure, then we might be able to reduce the op_array size and decrease the cache miss? is it doable? I'm not sure if patritioning data of op_array, into frequntly and rarely used, may make any significant difference. Because we usually work only with a single instance of op_array in each moment. Fields reordering alrecy helped to reduce cache-misses. But I may be wrog :) Thanks. Dmitry. > > > > Cheers, > Yo-An Lin > https://github.com/c9s > --001a113f1e20b67e7d0522b424f2--