unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: tzz@lifelogs.com, emacs-devel@gnu.org
Subject: Re: bool-vector implementation in the Emacs core
Date: Fri, 23 Jan 2004 09:37:36 +0900 (JST)	[thread overview]
Message-ID: <200401230037.JAA02124@etlken.m17n.org> (raw)
In-Reply-To: <m3k73jtt8b.fsf@kfs-l.imdomain.dk> (no-spam@cua.dk)

In article <m3k73jtt8b.fsf@kfs-l.imdomain.dk>, no-spam@cua.dk (Kim F. Storm) writes:
>>  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? 

I'm not sure.  Emacs-unicode uses char-table for many
things.  It is a pseudo array of 0..#x3FFFFF.  So, if
indices fit in this range, you can use it not only for a
character, but for any integer.

Ex. Set `t' to these ranges: (1 (6 . 8) 1000 (1500 . 1600) 2000)

(setq tbl (make-char-table nil))
(aset tbl 1 t)
(set-char-table-range tbl '(6 . 8) t)
(aset tbl 1000 t)
(set-char-table-range tbl '(1500 . 1600) t)
(aset tbl 2000 t)

It may consume more memory than ranges or inversion list,
(aref tbl N) is quite faster than them.

It is also possible to implement a code that doesn't limit
the range to 0..#x3fffff if it is really required.

---
Ken'ichi HANDA
handa@m17n.org

  reply	other threads:[~2004-01-23  0:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-21 16:52 bool-vector implementation in the Emacs core Ted Zlatanov
2004-01-21 17:06 ` Paul Jarc
2004-01-21 18:35   ` Ted Zlatanov
2004-01-23  0:16 ` Kim F. Storm
2004-01-23  0:37   ` Kenichi Handa [this message]
2004-01-23  2:19     ` Stefan Monnier
2004-01-23 20:26     ` Ted Zlatanov
2004-01-24 21:40       ` Richard Stallman
2004-01-25  2:59         ` Ted Zlatanov
2004-01-26 19:23           ` Richard Stallman
2004-01-27  1:32             ` Kim F. Storm
2004-01-23 20:18   ` Ted Zlatanov
2004-01-24  2:11     ` Kim F. Storm

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401230037.JAA02124@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).