New Lookup Table (MixString)
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Sat Sep 2 14:20:58 UTC 2023
Lets see:
O(n) search for alphabet index
Limited tables, that do not scale to other languages.
Tables limited to BMP.
Not particularly useful generally speaking, but with some improvements
it may be useful in a limited capacity.
Search can be replaced with either binary search (where probability of a
particular character is unknown), fibonacci search if the probability is
known with a preference towards the start of the ranges.
Typically for such tables, they would be implemented using a multi-level
trie. With the lookup being O(1). Costs more ROM, but is well worth it
for the speed.
Unicode Demystified covers the standard method for doing this sort of
lookup as well as how to do the case conversion correctly.
https://www.amazon.com/Unicode-Demystified-Practical-Programmers-Encoding/dp/0201700522
More information about the Digitalmars-d
mailing list