Hi Bulat,

On Tue, Aug 17, 2010 at 10:34 AM, Bulat Ziganshin <bulat.zigans...@gmail.com
> wrote:

>  > It's not clear to me that using UTF-16 internally does make
> > Data.Text noticeably slower.
>
> not slower but require 2x more memory. speed is the same since
> Unicode contains 2^20 codepoints
>

Yes, in theory a program could use as much as 2x the memory. That being
said, most programs don't hold that much text data in memory at any given
point so that might be 2x of a small number. One experiment [1] found it
difficult to show any difference in memory usage at all in Trac when
switching Python's internal representation from UCS2 to UCS4.

So it's not clear to me that using UTF-16 makes the program noticeably
slower or use more memory on a real program.

1. http://www.cmlenz.net/archives/2008/07/the-truth-about-unicode-in-python

Cheers,
Johan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to