Re: cvs: php-src /ext/standard basic_functions.c
| From: | Ilia Alshanetsky | Date: | Thu, 15 Sep 2005 16:16:57 +0000 |
| Subject: | Re: cvs: php-src /ext/standard basic_functions.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-33970@lists.php.net to get a copy of this message | ||
Dmitry,
While passing by ref in this case would be a bit faster, but those two
functions really should not be taking arguments by reference. What we
really need is "pass by const".
Ilia
Dmitry Stogov wrote:
> Hi Ilia,
>
> In php 5.1 and above we can use ZEND_SEND_PREFER_REF flag instead of
> ZEND_SEND_BY_REF.
> I think we should do it.
>
> Thanks. Dmitry.
>
>
>>-----Original Message-----
>>From: Ilia Alshanetsky [mailto:ilia@prohost.org]
>>Sent: Wednesday, September 14, 2005 6:11 PM
>>To: Dmitry Stogov
>>Cc: 'Ilia Alshanetsky'; php-cvs@lists.php.net; Andi Gutmans;
>>Zeev Suraski
>>Subject: Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c
>>
>>
>>Dmitry Stogov wrote:
>>
>>>Are you sure?
>>>Passing by value may copy whole array.
>>
>>It makes the functions a TINY bit slower 0.06 seconds for
>>1000000 itterations, but makes it possible to pass return
>>values of functions that return arrays.
>>
>>Ilia
>>
>>
>
>
>
>
>