bit sets and their uses

chris hermansen clhermansen@gmail.com
Wed Feb 4 02:22:56 GMT 2026


Good evening Jose, everyone,

On Tue, Feb 3, 2026 at 2:43 PM Jose E. Marchesi <jemarch@gnu.org> wrote:

>
> Hello Chris.
>
> > Hi everyone,
> >
> > van Vliet defines a mode CharBag in his transput routines as:
> >
> > mode {ℵ₀} CharBag =
> >   PSEUDO56 { Some mode which allows efficient retrieval of
> >     information as to the presence or absence of a given character in a
> >     given set (for example, a bit string). };
> >
> > He goes on to use CharBag to define sets of characters that are
> interesting
> > for formatting purposes as well as supporting terminator characters.
> >
> > This probably seemed pretty simple to implement at the time where "all
> char
> > values fit in 8 bits".  But with Unicode...
> >
> > So I did some looking around and came upon this:
> >
> > https://roaringbitmap.org
> >
> > which seems quite interesting, at least from the perspective of handling
> > bit sets efficiently.
> >
> > I'm wondering if anyone else has looked at this problem and found a
> > preferred solution?
>
> If it was me I would just use a string for CharBag at this point (making
> STRINGTOBAG pretty trivial) then worry about performance later..
>
> Unicode has _a lot_ of codepoints, so a sophisticated implementation of
> sets like the one you mention is probably what we need.
>

Ok, sounds like a good plan.  I hope to have a chance to review the Java
version of this Roaring Bitmap code.  If I learn anything useful I will
summarize to the list.


-- 
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/algol68/attachments/20260203/6d379720/attachment-0001.htm>


More information about the Algol68 mailing list