Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Ranges
Date: Tue, 06 Jan 2004 01:44:39 -0500	[thread overview]
Message-ID: <4nekud8tk8.fsf@collins.bwh.harvard.edu> (raw)
In-Reply-To: <m3smitbqa6.fsf@multivac.cwru.edu> (Paul Jarc's message of "Tue, 06 Jan 2004 00:26:51 -0500")

On Tue, 06 Jan 2004, prj@po.cwru.edu wrote:

> AIUI, It would be another way to represent a list of article
> numbers.  For example, if the last article number in a group is 8
> (or maybe even if not): 

> Inversion list Range list  Full list 
> (2 5 7 8)      ((2 . 4) 7) (2 3 4 7)

Right.  Inversion lists are as compact as ranges, but have some nicer
features - insertion and deletion of items from the inversion list is,
I think, simpler and faster code than ranges.  There's no
consolidation or splitting of ranges needed - you just eliminate any
duplicate numbers if they happen after an insertion or a deletion.
Also, for a range you have to examine the beginning and the end of the
range if you're searching.  With an inversion list you know it's
sorted, so you can step through the list in linear time (or O(log2(n))
if you can access elements randomly, but I don't think that's possible
with the regular single-linked lists in Emacs).

> I think an inversion list would use 1-2 times as many conses as the
> corresponding range list.

Also, more garbage collection would probably happen when the list gets
rebuilt.  It may not be the optimal solution, but I think some
benchmarking would be good.  I'll look at gnus-range.el, time
permitting.

Ted



  reply	other threads:[~2004-01-06  6:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05  4:45 Ranges Lars Magne Ingebrigtsen
2004-01-05  6:49 ` Ranges Zack Weinberg
2004-01-05 10:57   ` Ranges Per Abrahamsen
2004-01-05  7:13 ` Ranges Steve Youngs
2004-01-05  7:51   ` Ranges Lars Magne Ingebrigtsen
2004-01-05 11:01 ` Ranges Kim Minh Kaplan
2004-01-05 11:19   ` Ranges Lars Magne Ingebrigtsen
2004-01-06  8:44     ` Ranges Kim Minh Kaplan
2004-01-05 19:01 ` Ranges Ted Zlatanov
2004-01-06  4:58   ` Ranges Lars Magne Ingebrigtsen
2004-01-06  5:26     ` Ranges Paul Jarc
2004-01-06  6:44       ` Ted Zlatanov [this message]
2004-01-07  2:35         ` Ranges Lars Magne Ingebrigtsen
2004-01-08 21:52           ` Ranges Ted Zlatanov
2004-01-10 18:43             ` Ranges Dan Christensen
2004-01-12 21:13               ` Ranges Ted Zlatanov
2004-01-12 21:28           ` Ranges Paul Jarc
2004-01-20 23:53             ` Ranges Ted Zlatanov
2004-01-21  7:15               ` Ranges Paul Jarc
2004-01-21 15:19                 ` Ranges Ted Zlatanov
2004-01-05 21:39 ` Ranges Kai Grossjohann
2004-01-06  5:00   ` Ranges Lars Magne Ingebrigtsen
2004-01-06  6:34     ` Ranges Steve Youngs
2004-01-10 16:13 ` Ranges Gaute B Strokkenes

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=4nekud8tk8.fsf@collins.bwh.harvard.edu \
    --to=tzz@lifelogs.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).