Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61765E65E for ; Sat, 16 Mar 2013 14:54:16 +0000 (UTC) Received: (qmail 8225 invoked by uid 500); 16 Mar 2013 14:54:14 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 7864 invoked by uid 500); 16 Mar 2013 14:54:13 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 7839 invoked by uid 99); 16 Mar 2013 14:54:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Mar 2013 14:54:12 +0000 Date: Sat, 16 Mar 2013 14:54:12 +0000 (UTC) From: "Yonik Seeley (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-4839) Sorter API: Use TimSort to sort doc IDs and postings lists MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13604285#comment-13604285 ] Yonik Seeley commented on LUCENE-4839: -------------------------------------- Sweet! Extra nostalgia points - I remember when timsort was put into python. I hadn't realized that Java7's object sorting was based on it though. > Sorter API: Use TimSort to sort doc IDs and postings lists > ---------------------------------------------------------- > > Key: LUCENE-4839 > URL: https://issues.apache.org/jira/browse/LUCENE-4839 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Adrien Grand > Assignee: Adrien Grand > Priority: Minor > Attachments: LUCENE-4839.patch > > > TimSort (http://svn.python.org/projects/python/trunk/Objects/listsort.txt, used by python and Java's Arrays.sort(Object[]) in particular) is a sorting algorithm that performs very well on partially-sorted data. Indeed, with TimSort, sorting an array which is in reverse order or a finite concatenation of sorted arrays is a linear operation (instead of O(n ln(n))). > The sorter API could benefit from this algorithm when using Sorter.REVERSE_DOCS or merging several sorted readers for example. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org