From issues-return-8585-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Sun Jun 21 12:18:19 2009 Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 18388 invoked from network); 21 Jun 2009 12:18:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jun 2009 12:18:19 -0000 Received: (qmail 17313 invoked by uid 500); 21 Jun 2009 12:18:29 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 17214 invoked by uid 500); 21 Jun 2009 12:18:29 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 17204 invoked by uid 99); 21 Jun 2009 12:18:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jun 2009 12:18:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jun 2009 12:18:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 61D88234C004 for ; Sun, 21 Jun 2009 05:18:07 -0700 (PDT) Message-ID: <781140191.1245586687386.JavaMail.jira@brutus> Date: Sun, 21 Jun 2009 05:18:07 -0700 (PDT) From: "Eugene Kirpichov (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (MATH-169) Rolling statistics In-Reply-To: <14116362.1192080590665.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12722348#action_12722348 ] Eugene Kirpichov commented on MATH-169: --------------------------------------- Rolling percentiles seems like an interesting and useful thing to do; however, the implementation looks to me like it might have poor performance under some circumstances. Namely, the SortedDeque class uses a LinkedList for storing items in order, and does a Collections.binarySearch on it. However, Collections.binarySearch is very inefficient for the LinkedList: actually, so inefficient that a linear search is much faster. If you are maintaining a fixed-size sorted queue, I'd suggest you to use a binary heap; when it is full and a new item goes in, insert the new item and delete the minimum from the heap. One might simply use a PriorityQueue, or implement a heap of double's for greater efficiency. > Rolling statistics > ------------------ > > Key: MATH-169 > URL: https://issues.apache.org/jira/browse/MATH-169 > Project: Commons Math > Issue Type: Improvement > Reporter: Bradford N. Cross > Assignee: Phil Steitz > Fix For: 2.1 > > Attachments: FirstRollingPatch, RankRollingPatch > > > Rolling statistics with optimized calculation algorithms. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.