haskell / haskell/bytestring

Ideas for better bytestring builder

Open
#194 17 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
301
Forks
144
Avg merge
7d 22h
Merged PRs (30d)
1

Description

As https://github.com/haskell-perf/strict-bytestring-builders pointed out, current Data.ByteString.Builder tends to be slow especially when primitives are small.

Some alternatives have good benchmark results (cf https://www.reddit.com/r/haskell/comments/e6yg76/mason_faster_bytestring_builder/ ,https://github.com/fumieval/mason#performance, http://hackage.haskell.org/package/fast-builder); we may be able to take some tricks from those.

It also makes sense to expand the API so that

* Can build strict ByteString directly
* return the length after `hPutBuilder`

I think it's important that the internal API are exposed. At the moment it's difficult to send the contents of Builder over a socket due to `BuildSignal` being opaque.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.