From: Andi Kleen <ak@muc.de>
Cc: jari.aalto@ntc.nokia.com, Ding mailing list <ding@gnus.org>
Subject: Re: elp: gnus-article-sort-by-number run 664 times?
Date: 22 Mar 1998 19:34:30 +0100 [thread overview]
Message-ID: <k2g1kao9qh.fsf@zero.aec.at> (raw)
In-Reply-To: Alan Shutko's message of 19 Mar 1998 15:09:11 -0600
Alan Shutko <ats@acm.org> writes:
> >>>>> "J" == jari aalto <jari.aalto@poboxes.com> 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
next prev parent reply other threads:[~1998-03-22 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-19 20:51 jari.aalto
1998-03-19 21:09 ` Alan Shutko
1998-03-22 18:34 ` Andi Kleen [this message]
1998-03-23 2:30 ` Felix Lee
1998-03-19 22:30 ` Colin Rafferty
1998-03-20 3:53 ` Paul Franklin
1998-03-20 4:56 ` Alan Shutko
1998-03-20 16:20 ` jari.aalto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=k2g1kao9qh.fsf@zero.aec.at \
--to=ak@muc.de \
--cc=ding@gnus.org \
--cc=jari.aalto@ntc.nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).