Re: Small question about performance
| From: | Stas Malyshev | Date: | Thu, 15 Mar 2012 16:49:45 +0000 |
| Subject: | Re: Small question about performance | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-58964@lists.php.net to get a copy of this message | ||
Hi!
If I am understanding the text correctly it is saying thatShort answer: it doesn't matter, use either as you wish. Long answer: Technically, the former also uses hash buckets to bind values to the symbol table, so it can use more memory (and if it so happens that using these variables makes symbol table go over hashtable threshold, hashtable internal storage size will be increased), so it will consume marginally more memory. But the difference is completely negligible. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227$f1 = f1(); $f2 = f2($f1); $f3 = f3($f2);is using more memory than$f3 = f3(f2(f1()));