[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bool-vector implementation in the Emacs core

From: Kim F. Storm
Subject: Re: bool-vector implementation in the Emacs core
Date: 23 Jan 2004 01:16:04 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Ted Zlatanov <address@hidden> writes:

> We're talking about implementations of ranges in the Gnus developer
> list right now, and our implementations of ranges is written in
> Lisp.  I can implement inversion lists in Lisp as well, but ranges
> are such an essential Gnus piece that it seems like seeking core
> support for them would be a good idea.

What kind of C-level support are you looking for?

If you implement inversion lists with lists, I don't really think
lookups or inserts will be significantly faster in C than in
byte-compiled Elisp.

I do think that it would be a good idea to add the bool-vector support
to the emacs lisp core files though, e.g. in subr.el.

What kind of API do you envision?

> When dealing with vectors, we can preallocate a fixed number of slots
> at the end of the vector to allow for growth or shrinkage of the
> inversion list.  The empty slots can be contain the repetition of
> the last value, or 0 as an out-of-band value.  I think a list-based
> implementation is slightly better, though.

IMO, vectors are the wrong tool for this kind of job -- lists are both
faster and more flexible to use for inversion lists.

> I did a search on this topic, but could not find anything.  I hope my
> proposal is of interest to people other than Gnus developers (Unicode
> coders, for instance).

It's a good question -- will unicode benefit from this at the C-level? 

Kim F. Storm <address@hidden> http://www.cua.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]