Re: Faster zend sorting implementation

From: Date: Tue, 06 Jan 2015 02:39:57 +0000
Subject: Re: Faster zend sorting implementation
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-80216@lists.php.net to get a copy of this message
On Tue, Jan 6, 2015 at 2:04 AM, Tim Düsterhus <tim@bastelstu.be> wrote: > On 05.01.2015 18:08, Xinchen Hui wrote: >> do you think such BC break is acceptable? or I still need a RFC? :< >> > > Chiming in as a pure userland developer. The documentation already states: > >> Note: Like most PHP sorting functions, sort() uses an implementation > of » Quicksort. The pivot is chosen in the middle of the partition > resulting in an optimal time for already sorted arrays. This is however > an implementation detail you shouldn't rely on. thanks, then I think no problem. the reason why I asked is I found lots of test scripts starts to fail, they all rely on the current non-stable sorting algo :< thanks > > As the selection of the pivot element may also affect the order of equal > elements and is explicitly defined as “one should not rely on it” this > change seems to be fine from my perspective. > > Tim -- Xinchen Hui @Laruence http://www.laruence.com/

« previous php.internals (#80216) next »