From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: bool-vector implementation in the Emacs core Date: 27 Jan 2004 02:32:57 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <4nd69dfdn2.fsf@collins.bwh.harvard.edu> <200401230037.JAA02124@etlken.m17n.org> <4nd69a4diq.fsf@collins.bwh.harvard.edu> <4n4qukg2c9.fsf@collins.bwh.harvard.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075163755 28510 80.91.224.253 (27 Jan 2004 00:35:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2004 00:35:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jan 27 01:35:49 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlHCm-0001i0-00 for ; Tue, 27 Jan 2004 01:35:48 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlHCm-0003BX-00 for ; Tue, 27 Jan 2004 01:35:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlHBF-0006gs-RL for emacs-devel@quimby.gnus.org; Mon, 26 Jan 2004 19:34:13 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AlHB0-0006ZN-TL for emacs-devel@gnu.org; Mon, 26 Jan 2004 19:33:58 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AlHAL-0006Kk-Ru for emacs-devel@gnu.org; Mon, 26 Jan 2004 19:33:50 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlHAK-0006JD-Iu for emacs-devel@gnu.org; Mon, 26 Jan 2004 19:33:16 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 7DE1C26295F; Tue, 27 Jan 2004 01:33:10 +0100 (CET) Original-To: Ted Zlatanov In-Reply-To: Original-Lines: 26 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19504 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19504 Richard Stallman writes: > I am not sure this is useful in general and worth adding to the C code. Well, we already have support for (dense) bool-vectors of fixed length in the core, so his proposal to extend that to support sparse (unlimited) bool vectors sounds sensible to me. However I think that--contrary to the dense bool vectors--the inversion lists can just as well be implemented in Lisp, so I agree that it is not worth adding to the C code just to extend the aref/aset API to cover sparse bool-vectors. Actually, looking at the code of aref and aset, I think it may very well make sense to keep them separate. BTW, the code I posted a few days ago had a bug in make-bool-vector. Here is a fixed version, renamed not to collide with the built-in make-bool-vector: (defun make-sparse-bool-vector () "Create an empty bool vector." (cons -1 nil)) -- Kim F. Storm http://www.cua.dk