[Haskell-cafe] Google Summer of Code: BlazeHTML RFC

Pierre-Etienne Meunier pierreetienne.meunier at gmail.com
Thu May 27 08:44:16 EDT 2010


** Advertisement **
Have you tried the library I have written, Data.Rope ?
** End of advertisement **

The algorithmic complexity of most operations on ropes is way better than on bytestrings : log n for all operations, except traversals, of course.

Cheers,
PE



El 27/05/2010, a las 06:01, Michael Snoyman escribió:

> 
> 
> On Thu, May 27, 2010 at 12:57 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
> On Thu, May 27, 2010 at 10:23 AM, Michael Snoyman <michael at snoyman.com> wrote:
> On Thu, May 27, 2010 at 11:16 AM, Ivan Miljenovic <ivan.miljenovic at gmail.com> wrote:
> Wow, I find it rather surprising that String out-performs Text; any
> idea why that is?  I wonder if you're just using it wrong...
> 
> Could be, I'd be very happy if that were the case. All of the benchmarks are available on Github, and the bytestring[1], text[2] and string[3] versions are all rather short.
> 
> Do you include the cost of encoding the result as e.g. UTF-8? The hope would be that the more compact Text would be faster to traverse, and thus encode, than the list based String.
> 
> No, but this is done on purpose. One of my goals in this benchmark was to determine whether I should consider switching Hamlet to ByteStrings. If I were to do so, then the UTF-8 encoding would be done at compile-time instead of run-time.
> 
> You're correct that a fair comparison would be to UTF-8 encode the Strings as well. However, that's not what most users are going to do most of the time: when dealing with ASCII data, a straight Char8.pack encoding will do the same as UTF-8. I'm simply pointing out that I think Blaze should support this style.
> 
> Michael
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100527/45f63dd3/attachment.html


More information about the Haskell-Cafe mailing list