[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bool-vector implementation in the Emacs core
From: |
Ted Zlatanov |
Subject: |
Re: bool-vector implementation in the Emacs core |
Date: |
Sat, 24 Jan 2004 21:59:50 -0500 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (usg-unix-v) |
On Sat, 24 Jan 2004, address@hidden wrote:
> Why not just write code to use such a list explicitly?
I can write it myself in ELisp (the code is very simple), but I had
two reasons for bringing it up on emacs-devel:
- I think other Emacs developers could benefit from the same code.
Inversion lists are very fast in most cases, and for sparse ranges
are significantly faster and use less memory than the current
implementation of bool-vector (which is basically a bitstring).
- I thought that a straight C implementation might be even better
than using ELisp primitives; it's best to ask that question of the
Emacs developers since I'm not familiar with the Emacs internals.
> Why do you need it to be hidden inside of a bool-vector?
Because the aref/aset API of bool-vector is nice, and existing code
that uses bool-vector can use inversion lists without major changes.
Also, bool-vector is definitely the right abstraction for what
inversion lists do. There's no need to invent a new data type, with a
new API, for basically a bool-vector with an alternate internal
representation.
You can specify hashtable size when you create it. In the same way
you could specify the bool-vector preference to be 'dense or 'sparse
for the range. Then Emacs would give you an inversion list for sparse
ranges or a bitstring for dense ranges. That's what I was really
hoping for.
Thank you
Ted
- bool-vector implementation in the Emacs core, Ted Zlatanov, 2004/01/21
- Re: bool-vector implementation in the Emacs core, Paul Jarc, 2004/01/21
- Re: bool-vector implementation in the Emacs core, Kim F. Storm, 2004/01/22
- Re: bool-vector implementation in the Emacs core, Kenichi Handa, 2004/01/22
- Re: bool-vector implementation in the Emacs core, Stefan Monnier, 2004/01/22
- Re: bool-vector implementation in the Emacs core, Ted Zlatanov, 2004/01/23
- Re: bool-vector implementation in the Emacs core, Richard Stallman, 2004/01/24
- Re: bool-vector implementation in the Emacs core,
Ted Zlatanov <=
- Re: bool-vector implementation in the Emacs core, Richard Stallman, 2004/01/26
- Re: bool-vector implementation in the Emacs core, Kim F. Storm, 2004/01/26
Re: bool-vector implementation in the Emacs core, Ted Zlatanov, 2004/01/23