comp.lang.ada
 help / color / mirror / Atom feed
From: Bob Duff <bobduff@theworld.com>
Subject: Re: Implementing character sets for Wide_Character
Date: Fri, 06 Mar 2015 13:15:22 -0500
Date: 2015-03-06T13:15:22-05:00	[thread overview]
Message-ID: <87385i9emd.fsf@theworld.com> (raw)
In-Reply-To: mdcq1u$4s6$1@news.albasani.net

Martin Trenkmann <martin.trenkmann@posteo.de> writes:

> I need to implement a containment check for Wide_Character in a wide
> character set. I have two approaches in mind.

If you really care about speed, then implement both and measure the
speed.  It's not clear that the bit map will be faster -- using more
memory harms cache behavior.

Also take a look at package Ada.Strings.Wide_Maps.
It contains type Wide_Character_Set, represented as a sorted
sequence of ranges.  Measure that one, too.

Another possibility is an array of pointers to bit maps,
with "null" in place of "all-False".

It all depends on what kinds of sets you're going to create,
and what operations you need to do.

Why Wide_Character rather than Wide_Wide_Character?

- Bob


  reply	other threads:[~2015-03-06 18:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 18:01 Implementing character sets for Wide_Character Martin Trenkmann
2015-03-06 18:15 ` Bob Duff [this message]
2015-03-06 21:02   ` Martin Trenkmann
2015-03-06 18:18 ` G.B.
2015-03-06 21:06   ` Martin Trenkmann
2015-03-06 22:21     ` Bob Duff
2015-03-06 19:24 ` Dmitry A. Kazakov
2015-03-06 21:48 ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox