Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80193 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53852 invoked from network); 5 Jan 2015 18:15:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 18:15:04 -0000 Received: from [127.0.0.1] ([127.0.0.1:11503]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 37/A6-21693-8A4DAA45 for ; Mon, 05 Jan 2015 13:15:04 -0500 Authentication-Results: pb1.pair.com header.from=tim@bastelstu.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tim@bastelstu.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bastelstu.be designates 78.46.88.104 as permitted sender) X-PHP-List-Original-Sender: tim@bastelstu.be X-Host-Fingerprint: 78.46.88.104 xqk7.com Received: from [78.46.88.104] ([78.46.88.104:50259] helo=xqk7.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/E5-21693-132DAA45 for ; Mon, 05 Jan 2015 13:04:33 -0500 Message-ID: <54AAD22C.2010805@bastelstu.be> Date: Mon, 05 Jan 2015 19:04:28 +0100 MIME-Version: 1.0 To: Xinchen Hui , PHP Internals , Dmitry Stogov , Nikita Popov References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Faster zend sorting implementation From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) 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. 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