Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-24 Thread Pierre Joye
On Tue, Mar 24, 2015 at 1:14 PM, Xinchen Hui wrote: > Hey: > > On Tue, Mar 24, 2015 at 2:04 PM, Pierre Joye wrote: >> On Tue, Mar 24, 2015 at 1:01 PM, Xinchen Hui wrote: >>> Hey: >>> >>> On Tue, Mar 24, 2015 at 1:54 PM, Pierre Joye wrote: On Tue, Mar 24, 2015 at 12:35 PM, Xinchen Hui wrot

Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-24 Thread Rasmus Lerdorf
On 03/23/2015 11:14 PM, Xinchen Hui wrote: >>> from user land. this won't change anything.. >> >> Nothing to do with userland or not but code stabilization > In that case, yeah. you might be right. > > but from my opinion, simpler always means easier for maintaining > > anyway, I hope this

Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-23 Thread Xinchen Hui
Hey: On Tue, Mar 24, 2015 at 2:04 PM, Pierre Joye wrote: > On Tue, Mar 24, 2015 at 1:01 PM, Xinchen Hui wrote: >> Hey: >> >> On Tue, Mar 24, 2015 at 1:54 PM, Pierre Joye wrote: >>> On Tue, Mar 24, 2015 at 12:35 PM, Xinchen Hui wrote: Hey: On Tue, Mar 24, 2015 at 1:31 PM, Pierre

Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-23 Thread Pierre Joye
On Tue, Mar 24, 2015 at 1:01 PM, Xinchen Hui wrote: > Hey: > > On Tue, Mar 24, 2015 at 1:54 PM, Pierre Joye wrote: >> On Tue, Mar 24, 2015 at 12:35 PM, Xinchen Hui wrote: >>> Hey: >>> >>> On Tue, Mar 24, 2015 at 1:31 PM, Pierre Joye wrote: hi! On Tue, Mar 24, 2015 at 5:41 AM, Dmi

Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-23 Thread Xinchen Hui
Hey: On Tue, Mar 24, 2015 at 1:54 PM, Pierre Joye wrote: > On Tue, Mar 24, 2015 at 12:35 PM, Xinchen Hui wrote: >> Hey: >> >> On Tue, Mar 24, 2015 at 1:31 PM, Pierre Joye wrote: >>> hi! >>> >>> On Tue, Mar 24, 2015 at 5:41 AM, Dmitry Stogov wrote: Hi, Recently, Xinchen and me wo

Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-23 Thread Pierre Joye
On Tue, Mar 24, 2015 at 12:35 PM, Xinchen Hui wrote: > Hey: > > On Tue, Mar 24, 2015 at 1:31 PM, Pierre Joye wrote: >> hi! >> >> On Tue, Mar 24, 2015 at 5:41 AM, Dmitry Stogov wrote: >>> Hi, >>> >>> Recently, Xinchen and me worked on optimization that eliminates useless >>> reallocations and cop

Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-23 Thread Xinchen Hui
Hey: On Tue, Mar 24, 2015 at 1:31 PM, Pierre Joye wrote: > hi! > > On Tue, Mar 24, 2015 at 5:41 AM, Dmitry Stogov wrote: >> Hi, >> >> Recently, Xinchen and me worked on optimization that eliminates useless >> reallocations and copying during string concatenation (ZEND_ADD_STRING and >> family +

Re: [PHP-DEV] Use "ropes" for string concatenation

2015-03-23 Thread Pierre Joye
hi! On Tue, Mar 24, 2015 at 5:41 AM, Dmitry Stogov wrote: > Hi, > > Recently, Xinchen and me worked on optimization that eliminates useless > reallocations and copying during string concatenation (ZEND_ADD_STRING and > family + ZEND_CONCAT). > > The idea comes from ropes, but adopted especially f

[PHP-DEV] Use "ropes" for string concatenation

2015-03-23 Thread Dmitry Stogov
Hi, Recently, Xinchen and me worked on optimization that eliminates useless reallocations and copying during string concatenation (ZEND_ADD_STRING and family + ZEND_CONCAT). The idea comes from ropes, but adopted especially for our needs. Rope is popular data structure in languages with immutable