logo       

Re: [Haskell] ANNOUNCE: FPS - FastPackedStrings 0.2: msg#00084

lang.haskell.libraries

Subject: Re: [Haskell] ANNOUNCE: FPS - FastPackedStrings 0.2

John Meacham <john@xxxxxxxxxxx> writes:

> I'd recommend just always using utf8 under the hood

Or have two cases of the representation: an array of bytes if every
character is U+00FF or below, or an array of 32-bit words otherwise.

My Kogut compiler does that internally, and makes use of that when
interfacing with C (the default encoding is assumed to preserve ASCII;
if the narrow case has only ASCII chars, a pointer to its internals
is passed to a C function; for this reason it has an otherwise unused
'\0' after the last character).

AFAIK CLISP has 16-bit words as the third case.

--
__("< Marcin Kowalczyk
\__/ qrczak@xxxxxxxxxx
^^ http://qrnik.knm.org.pl/~qrczak/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise