Closed bjornbugge closed 2 years ago
Thanks, the "binary" in "msgpack-binary" stands for the "binary" package. I'll make a separate package for "msgpack-persist" that this code can live in.
I've created https://github.com/TokTok/hs-msgpack-persist and imported your code there. Thanks! It'll be available as "msgpack-persist" on hackage soon.
@bjornbugge FYI I did some measurements on large random (Arbitrary
) data:
msgpack-binary
Generating sample...
Generated msgpack array of length 522 in 10.45877556s
Message packed into 44 MiB in 6.757644817s
Packing speed: 6.511144221328494 MiB/s
msgpack-persist
Generating sample...
Generated msgpack array of length 406 in 8.216886083s
Message packed into 33 MiB in 0.490124767s
Packing speed: 67.32979482344747 MiB/s
This is only writing. I haven't done reading yet because you optimised the reading code in the Persist version so it wouldn't be a fair comparison without doing that optimisation in the Binary version as well.
Thanks again :).
Hi @iphydf, sorry for my very late reaction to your messages. Thanks a lot for creating the other project and putting it on Hackage! 👍
On AST-like tree datastructures it's about twice as fast as
binary
when serializing. For deserialization, it's faster on the existing benchmarks as well, but it's only half as fast asbinary
when writing integers.This change is