From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/14732 Path: main.gmane.org!not-for-mail From: Andi Kleen Newsgroups: gmane.emacs.gnus.general Subject: Re: elp: gnus-article-sort-by-number run 664 times? Date: 22 Mar 1998 19:34:30 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035153876 17906 80.91.224.250 (20 Oct 2002 22:44:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:44:36 +0000 (UTC) Cc: jari.aalto@ntc.nokia.com, Ding mailing list Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id KAA11428 for ; Sun, 22 Mar 1998 10:31:55 -0800 Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by xemacs.org (8.8.5/8.8.5) with ESMTP id MAA12312 for ; Sun, 22 Mar 1998 12:32:26 -0600 (CST) Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id NAN10349; Sun, 22 Mar 1998 13:07:49 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 22 Mar 1998 12:31:38 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id MAA15332 for ; Sun, 22 Mar 1998 12:31:31 -0600 (CST) Original-Received: (qmail 13335 invoked by uid 504); 22 Mar 1998 18:31:19 -0000 Original-Received: (qmail 13332 invoked from network); 22 Mar 1998 18:31:19 -0000 Original-Received: from zero.aec.at (qmaill@193.170.192.102) by claymore.vcinet.com with SMTP; 22 Mar 1998 18:31:18 -0000 Original-Received: (qmail 13896 invoked by uid 573); 22 Mar 1998 18:34:30 -0000 Original-To: Alan Shutko In-Reply-To: Alan Shutko's message of 19 Mar 1998 15:09:11 -0600 Original-Lines: 16 X-Mailer: Gnus v5.4.41/Emacs 19.34 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:14732 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:14732 Alan Shutko writes: > >>>>> "J" == jari aalto writes: > > J> I was studying what gnus does when I enter a group with SPC and > J> I got this. I'm wondering why so high call count as 664 for a group > J> (mail.emacs) which only has 173 articles? > > That's because qsort is O(n lg n). And the worst case is O(n ^ 2) for data that is already mostly sorted. I wouldn't be surprised if that is often the case for newsgroups... How about switching to introsort, which in most cases does better than qsort and doesn't have this ugly worst case? -Andi