RE: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c

From: Date: Fri, 16 Sep 2005 05:30:34 +0000
Subject: RE: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-33976@lists.php.net to get a copy of this message
ZEND_SEND_PREFER_REF does pass by reference if it is possible and pass by value in other case (constants, temporary results). So it is does the same as "pass by const". Thanks. Dmitry. > -----Original Message----- > From: Ilia Alshanetsky [mailto:ilia@prohost.org] > Sent: Thursday, September 15, 2005 8:17 PM > To: Dmitry Stogov > Cc: php-cvs@lists.php.net; 'Andi Gutmans'; 'Zeev Suraski' > Subject: Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c > > > 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 > >> > >> > > > > > > > > > > > >

« previous php.cvs (#33976) next »