Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80242 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94043 invoked from network); 6 Jan 2015 20:46:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2015 20:46:07 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.181 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.181 mail-vc0-f181.google.com Received: from [209.85.220.181] ([209.85.220.181:59098] helo=mail-vc0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/C4-61664-C894CA45 for ; Tue, 06 Jan 2015 15:46:04 -0500 Received: by mail-vc0-f181.google.com with SMTP id le20so2512vcb.40 for ; Tue, 06 Jan 2015 12:46:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=hbGS8Oa4rWF1dzs2dwDWC+qg3HaBJAE2yKwd8Qukh8g=; b=Qo8KqkoAU1MXqffwnavYSp54VO8htc3PERkSgHGdAHob696DbnG+5jvMuB68ozlQRE Cwrl94A/2ezJv2KJdjaX0Z606JKxFamhZVfiz8mDlwrg4tXsHdkzks0I7fbAkxgJZy/v NFn2XzcEIoVKYr/c/aPiQGGySvmQOx39u+OTxxkItmS4tBbtOcnYy2XdVFdurGZHjlMO EBe8kQ6t8Og64a1LkvdVnUzd8H/mklzZL1W850S8Uuizidq13w+k+fV+cmoGZyU6u8mY 66M2uJaWVp48G3m6A4kDt5Q9lGPKnCpUQeNmLghqWiTRgLmBw48EkhgMIy/KOHc98H1A PyrA== X-Gm-Message-State: ALoCoQk8LCzdIptrUfKexKCKjWtelSa8/+ahh3Sij2XLKhwdGABfq12ORi56EbrW5avyVNsQH5hYQHRkScXEOPU+Ddzzs+iFSZnpME/gAnW48UADIO1rEy4OgwkH0q5ysGgfEmehZFNq2sRid68dHCMk9ToINsL1kQ== MIME-Version: 1.0 X-Received: by 10.220.83.193 with SMTP id g1mr45438556vcl.46.1420577160741; Tue, 06 Jan 2015 12:46:00 -0800 (PST) Received: by 10.52.26.40 with HTTP; Tue, 6 Jan 2015 12:46:00 -0800 (PST) Received: by 10.52.26.40 with HTTP; Tue, 6 Jan 2015 12:46:00 -0800 (PST) In-Reply-To: References: Date: Wed, 7 Jan 2015 00:46:00 +0400 Message-ID: To: Laruence Cc: PHP Internals , Nikita Popov Content-Type: multipart/alternative; boundary=001a11c2c67a0ae05b050c01e5b8 Subject: Re: Faster zend sorting implementation From: dmitry@zend.com (Dmitry Stogov) --001a11c2c67a0ae05b050c01e5b8 Content-Type: text/plain; charset=UTF-8 I think this break is acceptable Of course, if the new sort implementation significantly improves performance on some cases and doesn't show degradation on the others. Thanks. Dmitry. On Jan 5, 2015 9:08 PM, "Xinchen Hui" wrote: > Hey: > > I was working on zend_qsort improvement. but I got a problem need > to be disscussed with you fist.. > > as we know, previously zend_qsort is not a stable sorting algo. > > my draft patch (which already get 0.1% IRs reduce in wordpress) > is kindof a stable sorting algo, you can find it here > (https://github.com/laruence/php-src/compare/zend_sort) > > so, there is a bc break, like for : > > $array = array("o", "O"); > sort($array, SORT_STRING|SORT_FLAG_CASE); > > var_dump($array); > > previously implementation does the swap: > > array(2) { > [0]=> > string(1) "O" > [1]=> > string(1) "o" > } > > but new implementation doesn't not: > > array(2) { > [0]=> > string(1) "o" > [1]=> > string(1) "O" > } > > do you think such BC break is acceptable? or I still need a RFC? :< > > thanks > -- > Xinchen Hui > @Laruence > http://www.laruence.com/ > --001a11c2c67a0ae05b050c01e5b8--