[Gambas-user] problems in trie class

Benoît Minisini gambas at ...1...
Mon Dec 1 20:28:46 CET 2014


Le 01/12/2014 19:05, Tobias Boege a écrit :
> On Mon, 01 Dec 2014, Tobias Boege wrote:
>>> If they are keys, they should be ASCII, not UTF-8, like with the
>>> Collection class.
>>>
>>
>> Currently the Trie supports arbitrary sequences of bytes as keys. It would
>> take some time to move the code back in that restricts the key space to
>> ASCII sequences. Consequently I'd like to leave it as-is.
>>
>
> OTOH, I will save 16 bytes per trie node if I restrict the key space to
> ASCII. I'll put the restriction back in place sometime later.
>

You have nothing to change. If you are case-sensitive, then your keys 
are automatically both ASCII and UTF-8. I'm speaking about charset only 
when case matters (because case depends on charset).

So I mean that if you want to be case unsensitive, then you must be case 
unsensitive in the ASCII sense, not UTF-8, to be compatible with the 
Collection class, and because UTF-8 case support is slow as hell.

Regards,

-- 
Benoît Minisini




More information about the User mailing list