bytestring
An efficient compact, immutable byte string type (both strict and lazy) suitable for binary or 8-bit character data. (by haskell)
containers
Assorted concrete container types (by haskell)
Our great sponsors
bytestring | containers | |
---|---|---|
15 | 11 | |
282 | 314 | |
1.1% | 0.3% | |
7.9 | 6.2 | |
about 1 month ago | about 23 hours ago | |
Haskell | Haskell | |
GNU General Public License v3.0 or later | BSD 3-clause "New" or "Revised" License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bytestring
Posts with mentions or reviews of bytestring.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-07-01.
-
Monthly Hask Anything (July 2022)
If you bring in efficient strings from bytestring, densely packed arrays from vector, and an in-place sort from vector-algorithms, you can bring it down to 275ms (uses 19MB of mem).
-
Haskell - Important Libraries
bytestring
-
[ANNOUNCE] GHC 9.2.2 is now available!
Note that this release is broken for Windows.
-
Dragging Haskell Kicking and Screaming into the Century of the Fruitbat :: Reasonably Polymorphic
Well, ByteString in particular should not have an IsString instance in a new report. That's pretty clear by https://github.com/haskell/bytestring/issues/140 : the concensus is that there is no good solution right now, but it should not have gotten an IsString instance in the first place. If a theoretical new Haskell Report 202x includes OverloadedStrings (as it should) to handle string literals analogously to numeric literals, I'd expect it to not give ByteString (which is really just a collection of octets) an IsString instance, with all it's issues and rattail due to the encoding question being implicitized.
-
How can Haskell programmers tolerate Space Leaks?
Standard streaming libraries. They are being written by people that make the effort to understand performance and I have a hope that they make sure their streams run in linear space under any optimizations. It is curious and unsettling that we have standard lazy text and byte streams at the same time — and the default lazy lists, of course. I have been doing some work on byte streams and what I found out is that there is no way to check that your folds are actually space constant even if the value in question is a primitive, like say a byte — thunks may explode and then collapse over the run time of a single computation, defying any effort at inspection.
-
NorfairKing/haskell-dangerous-functions ; Call for contributions
Apparently it's not very optimized though, as you pointed out yourself: https://github.com/haskell/bytestring/pull/371#issuecomment-786967047
-
Haskell ghost knowledge; difficult to access, not written down
If you need fast Double rendering you can get a significant improvement by using double-conversion or the Ryu branch of bytestring. Again, you'd expect that "how to show a floating-point number quickly" would be a solved problem, but it's not.
-
GHC 2021!
OverloadedStrings has a bad ByteString instance and should indeed be avoided: https://github.com/haskell/bytestring/issues/140
-
Artyom's Haskell toolbox — a long list of tools/libraries I use
I'm trying to iron out API discrepancies between flavours of ByteString in https://github.com/haskell/bytestring/issues/289, any help would be much appreciated.
containers
Posts with mentions or reviews of containers.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-30.
-
Programming with -XStrict/Unlifted datatypes and associated ecosystem/libraries/preludes
"Make invalid laziness unrepresentable" means you should use strict versions of container types instead of lazy ones. However, for better or for worse, sometimes the "strict version" of a data type is not actually a strict data type, it's just a strict API to the lazy type. Examples include Data.Map.Strict (not Data.Map or Data.Map.Lazy) or Data.HashMap.Strict (not Data.HashMap.Lazy) (sadly there is no Data.Sequence.Strict but perhaps there will be one day).
- Monthly Hask Anything (June 2022)
-
Why is seemingly infinite (lazy) recursion faster?
Edison and containers both have sequence types that support efficient, cons, snoc, viewL, viewR, append, map, and length.
-
Haskell - Important Libraries
containers
-
Assessing Haskell (blogpost, slightly negative!)
Calling linked lists Haskell's "primary data structure" seems off-base to me. Yes, there's String, yes, there's built-in syntax for List... but there's also everything in containers, and vector is pretty easy to use in practice, though it would probably be good for more learning material to mention it more prominently.
-
Looking for projects that make heavy use of IntMap which have benchmarks
I asked this on the libraries mailing list but thought posting here would bring in potentially more responses. I made a recent change to the behaviour of lookup and find (see here for more details: https://github.com/haskell/containers/pull/800).
-
Semver doesn't mean MAJOR.MINOR.PATCH, it means FAILS.FEATURES.BUGS
Rust has nothing on Haskell. containers, which might as well be considered part of the standard library, has been out for almost 14 years and is still 0.x
-
Monthly Hask Anything (July 2021)
When I was first learning I did a bunch of leetcode/codewars to get familiar with the containers library and GHCI repl workflow. Then using Real World Haskell as a reference I implemented a few coreutils to play with IO.
What are some alternatives?
When comparing bytestring and containers you can also consider the following projects:
bytestring-read - fast ByteString to number converting library
singletons - Fake dependent types in Haskell using singletons
EdisonAPI - Edison: A Library of Efficient Data Structures
igraph - Incomplete Haskell bindings to the igraph library (which is written in C)
hevm - Dapp, Seth, Hevm, and more
miso - :ramen: A tasty Haskell front-end framework
indexed-containers
btree-concurrent - A backend agnostic, concurrent BTree written in Haskell
bytestring-typenats - Haskell ByteStrings annotated with type-level naturals for lengths
adjunctions - Simple adjunctions
psqueues - Priority Search Queues in three different flavors for Haskell
bytestring-builder - The new bytestring builder, packaged outside of GHC