Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80217 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9433 invoked from network); 6 Jan 2015 03:41:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2015 03:41:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.177 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.177 mail-ie0-f177.google.com Received: from [209.85.223.177] ([209.85.223.177:60745] helo=mail-ie0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/40-21693-D595BA45 for ; Mon, 05 Jan 2015 22:41:17 -0500 Received: by mail-ie0-f177.google.com with SMTP id rd18so790805iec.8 for ; Mon, 05 Jan 2015 19:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=Pq/k++/5OS5uZC0uZjlskVZCAga16ixaWwcdiayWh18=; b=gtrMFuowjkJ+esXDE5giSLDsKnp7EXBb1U6o69yACP1BsC7qFARYCOj50gNlj4EM7w 7Ls+EpetTDXqJpY3tGOFKMAnPgDO6U/0k9yVku0/HYcWQcKdUvnNvetYqWuO22ZiuL+r oaq7mhqV/AHwmnkmSd/MdXIB4ZxTTBcAdKMTE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Pq/k++/5OS5uZC0uZjlskVZCAga16ixaWwcdiayWh18=; b=PiXbVfdclxGKZDKUu/EQ1ZBCrVtiO8I0DU/4/V7w11ljNhgQQScNf9E1KiHoPpewhg 0V3Igg9jh/EIBp1eroyOGETUkr92vSykiXHimUzSOnkKK1Zb0nqhnx/8KAapSicBrplm J4RG8pioTNNSChwXQzZrqPn0jVs36KZ4qpz4bu0k7r6nl/8IHitKzGCo8lqqILH1T5C2 iXrPISVBJzqkraB3bJHrYNkVkj1dNm0a2zNKFJyiqzloKdF5oJhQPUPB7VRn8uvTH0Sd wMlkvFEDVA3xrEpEf+Hp1XBNkoKxeC9k5iKL9C5VoM97DBN+GTRLV8YolGbgJ2u4pi5d g8mA== X-Gm-Message-State: ALoCoQnL698VqyEoDTnCKQSwEDpyB1ovcsxkng1Js4bXFouFPm7I6zSJp6+NPRLlRnFOSbufWAUN X-Received: by 10.50.77.74 with SMTP id q10mr14099138igw.30.1420515673721; Mon, 05 Jan 2015 19:41:13 -0800 (PST) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.43.112.9 with HTTP; Mon, 5 Jan 2015 19:40:53 -0800 (PST) In-Reply-To: References: <54AAD22C.2010805@bastelstu.be> Date: Mon, 5 Jan 2015 19:40:53 -0800 X-Google-Sender-Auth: mjRWlnSiKex-2m8k5H-DE6rtkPg Message-ID: To: Xinchen Hui Cc: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , PHP Internals , Dmitry Stogov , Nikita Popov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Faster zend sorting implementation From: aharvey@php.net (Adam Harvey) On 5 January 2015 at 18:39, Xinchen Hui wrote: > On Tue, Jan 6, 2015 at 2:04 AM, Tim D=C3=BCsterhus wro= te: >> 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 state= s: >> >>> Note: Like most PHP sorting functions, sort() uses an implementation >> of =C2=BB 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 :< We make no promises about the implementation on any of the relevant documentation pages, besides that it's a quick sort, and we explicitly say that you can't rely on that. I think we can change this without a real BC concern (although it would still be worth noting in UPGRADING and, by extension, the migration guide). Adam