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

Pierre-Etienne Meunier pierreetienne.meunier at gmail.com
Fri May 28 15:07:05 EDT 2010


About as much different as a Data.ByteString from an Array Int Char : there are several optimizations over a Data.Sequence.Seq that are specific to characters, for instance file IO using mmap, and the use of blocks (which would have been possible with about any constant size "Storable" type, of course). Moreover, there are tricks in a Data.Rope to hide the mutability of the blocks, which I do not believe appear in Data.Sequence : you can modify a rope once without copying anything (in incomplete blocks for instance). Of course referential transparency is preserved : if you remodify it afterwards, something will have to get copied, but I found it most useful when building large strings before writing them to files.
And last but not least, a data.sequence.seq char is called rope in the litterature ;-)

Anyway, good point, cause now I want to benchmark it against Data.Sequence.

PE



El 28/05/2010, a las 14:22, Max Rabkin escribió:

> On Thu, May 27, 2010 at 2:44 PM, Pierre-Etienne Meunier
> <pierreetienne.meunier at gmail.com> wrote:
>> ** 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
> 
> How is a Data.Rope.Rope different from a Data.Sequence.Seq Char?
> 
> --Max



More information about the Haskell-Cafe mailing list