Re: Traits and memory size
| From: | Ben Schmidt | Date: | Tue, 10 Apr 2012 12:36:14 +0000 |
| Subject: | Re: Traits and memory size | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-59640@lists.php.net to get a copy of this message | ||
On 10/04/12 5:42 PM, Stefan Marr wrote:
Hi Ben: On 10 Apr 2012, at 03:34, Ben Schmidt wrote:Thanks a lot for the answer, Stefan. That is good news. Smiles, Ben.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.