Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59625 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32274 invoked from network); 10 Apr 2012 07:43:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Apr 2012 07:43:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 81.20.134.149 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 81.20.134.149 vps-1012701-4512.united-hoster.de Received: from [81.20.134.149] ([81.20.134.149:57932] helo=vps-1012701-4512.united-hoster.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/09-34074-184E38F4 for ; Tue, 10 Apr 2012 03:42:58 -0400 Received: from d51a4d67f.access.telenet.be ([81.164.214.127] helo=[192.168.0.10]) by vps-1012701-4512.united-hoster.de with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SHVj3-0006Gm-A2; Tue, 10 Apr 2012 09:42:54 +0200 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4F838E2E.4040206@yahoo.com.au> Date: Tue, 10 Apr 2012 09:42:47 +0200 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <4F838E2E.4040206@yahoo.com.au> To: Ben Schmidt X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Traits and memory size From: php@stefan-marr.de (Stefan Marr) Hi Ben: On 10 Apr 2012, at 03:34, Ben Schmidt wrote: > During the flattening process, is a copy made of the trait code (or > bytecode or whatever)? Thanks to Dmitry, the op_array, i.e., the methods op codes are not = copied but shared between the methods. Thus, there is a certain memory benefit of sharing code in traits, = compared to manual copy and past. Best regards Stefan --=20 Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525