Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80182 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36011 invoked from network); 5 Jan 2015 17:09:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 17:09:04 -0000 Authentication-Results: pb1.pair.com header.from=laruence@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=xinchen.h@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.215.50 as permitted sender) X-PHP-List-Original-Sender: xinchen.h@zend.com X-Host-Fingerprint: 209.85.215.50 mail-la0-f50.google.com Received: from [209.85.215.50] ([209.85.215.50:59678] helo=mail-la0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/C2-21693-B25CAA45 for ; Mon, 05 Jan 2015 12:09:00 -0500 Received: by mail-la0-f50.google.com with SMTP id pn19so18897049lab.9 for ; Mon, 05 Jan 2015 09:08:57 -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:from:date:message-id:subject:to :content-type; bh=kyfTCuTcP7Yv7d2bjYA5OmWw2PtUmnfYc5IvBJbTHTw=; b=KxIsKo+88+l8St8QVeUBQrCCKpqbIjDDaoLZQNrNeNDc8wZFGft4tbbTxeguxU7rND PMHkkCiEvs/IUk1dqoALIj/EtnEng6xAiI7X7zkHuwTuVgSjFIeoaTeBE+sJuqvTYiWN Nn9SRi5rWFHjHejImf96sAcNC3hufdJ8HqhtgVxrkUETbHorgeFjZCxVHt/7fMiATHWf sKEzdRAEQZMZLUN6L0HLArIsKMQlw2km5w5oIgERPXtqQQ+njygQBMfPn1C3OMh5SIXT LY/8DRMMGBXcO4ocpVsPYufKOt1h8Y+d4rJAOQQ92tPrxEQ/FPOKBb0gDIy57FLbU3Kc 0o8w== X-Gm-Message-State: ALoCoQn7Gh2ubJxVVJGVJ12nU7wOvw/s4jhhshiUbHM0VDQohv82hDRU6Xs/wqzCGlAxBIXGy9auA95I8b6c8Q5hEB/hwZ60sxcfXKCfdumznsVhuhxluypAkxn8/TxGKhXVqbWprnyEjcBXuHZgcTVtPFaiBL6txw== X-Received: by 10.112.50.239 with SMTP id f15mr93076348lbo.31.1420477737085; Mon, 05 Jan 2015 09:08:57 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPSA id f7sm11618804lam.46.2015.01.05.09.08.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 Jan 2015 09:08:55 -0800 (PST) Received: by mail-la0-f54.google.com with SMTP id pv20so18086917lab.41 for ; Mon, 05 Jan 2015 09:08:55 -0800 (PST) X-Received: by 10.112.129.195 with SMTP id ny3mr95144748lbb.10.1420477735398; Mon, 05 Jan 2015 09:08:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.64.176 with HTTP; Mon, 5 Jan 2015 09:08:35 -0800 (PST) Date: Tue, 6 Jan 2015 01:08:35 +0800 Message-ID: To: PHP Internals , Dmitry Stogov , Nikita Popov Content-Type: text/plain; charset=UTF-8 Subject: Faster zend sorting implementation From: laruence@php.net (Xinchen Hui) 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/