Skip to content

fast bytestring building #31

Open
Open

Description

@jamesdbrock

https://hackage.haskell.org/package/bytestring-tree-builder

According to the benchmarks this builder implementation beats all the alternatives. It is especially well-suited for generating strict bytestrings, beating the standard builder by at least the factor of 4.

Activity

  1. jamesdbrock commented on May 24, 2020

    @jamesdbrock
    MemberAuthor

    I'm not sure that bytestring-tree-builder is better than ByteString mconcat.

    Maybe we should have a documentation section about making a lazy builder version of streamEditT. “If you want to construct the replaced stream as a lazy builder, consider using splitCap directly instead of using streamEditT. Write your pattern-matching parser sep so that it returns a Builder of your choice. Then build the output stream from the [Either ByteString Builder] list produced by splitCap. You should be able to efficiently build from the strict Left ByteString sections, as they are essentially just a pair of offsets delimiting a section of the input ByteString.”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions