[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Is Haskell capable of matching C in string processin

Subject: Re: [Haskell-cafe] Is Haskell capable of matching C in string processing performance?
From: John Millikin
Date: Sat, 23 Jan 2010 09:53:46 -0800
I'm using UCS-4, with uint32_t.

On Sat, Jan 23, 2010 at 03:43, Taru Karttunen <[email protected]> wrote:
> Excerpts from John Millikin's message of Fri Jan 22 19:40:58 +0200 2010:
>> Correct me if I'm wrong, but ByteStrings can't contain non-ASCII
>> values, right? I'm looking for something like this pseudo-C:
>>
>> Â Â typedef void (*Callback)(const uint32_t *chars, size_t n_chars, void *);
>> Â Â WriterState *new_state (Callback, void *);
>>
>> I tried using the Text type, but its conversions to Ptr Word16 are all
>> O(n) -- not much better than String.
>
> Are you using unicode on the C side with wchar_t?
>
> You can have utf-8 inside ByteStrings.
>
> - Taru Karttunen
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>