On Wed, Jan 19, 2011 at 12:04, Johan Tibell <[email protected]> wrote: > On Wed, Jan 19, 2011 at 8:37 PM, Michael Snoyman <[email protected]> wrote: >> Isn't Simon Meier working on migrating his code from blaze-builder >> into binary? > > So I heard (although not directly from Simon). I think it would be > nice to port the blaze-builder implementation to binary, but to keep > binaries current interface (for now).
>From the perspective of a library user, if there's to be code shuffling, I'd much rather have it be one-time (blaze-builder -> bytestring) than having multiple merges/ports going on. Especially since building bytestrings is a much more generic operation than binary serialisation. Regarding the interface, I think that as long as the same *basic* operations are available, it's fine to have extra operations as well. Several of blaze-builder's special-case functions (toByteStringIO , fromWriteList) allow more efficient operation than the generic interface. >> I agree with John that it would make more sense to go in >> bytestring. Assuming that happens, would the builder from text end up >> being based on it? > > ByteString and Text don't share an underlying data structure at the > moment (one uses pinned ForeignPtrs and one unpinned ByteArray#s) so > they can use the same builder efficiently. Some day perhaps. Can any of the blaze-builder optimizations be translated to the Text builder? When I benchmark it against binary and cereal, blaze-builder is approximately 2-3 times faster for most use cases. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
