haskell-perf / serialization Goto Github PK
View Code? Open in Web Editor NEWA micro-benchmark that compares some Haskell serialization libraries
License: Other
A micro-benchmark that compares some Haskell serialization libraries
License: Other
It seems estPoint has moved into a different module.
We're not serializing anything in 2 ns ;)
I'm sorry I don't have a PR for you, as I didn't care about packman and ripped it out and added some of my own benchmarks. But this sort of thing should yield meaningful numbers:
class Serialize lib a where
serialize :: lib -> a -> BS.ByteString
deserialize :: lib -> BS.ByteString -> a
instance (B.Binary a, NFData a) => Serialize Binary a where
serialize _ = LBS.toStrict . B.encode
deserialize _ = B.decode . LBS.fromStrict
...
bgroup "serialization"
[ bench "binary" $ whnf (serialize Binary) tree
....
Thanks for putting this together; it was very helpful!
One very useful application of these serialization libraries is to send data between Haskell servers and Haskell/GHCJS browser clients. It would be nice to see how they perform in GHCJS / whether or not they work.
I'm assuming that Multi-Language
should be safe, and Haskell
should be fairly safe, but Haskell-Same-Architecture
clearly not.
Besides this issue flat
seems to work ok in GHCJS for example.
I see that in table not the latest versions of libraries are used. So numbers might be outdated.
If anyone's interested, you could also summarize the output like this:
https://github.com/haskell-perf/sequences#append
I wrote a (not pretty, but works) script to do this here: https://github.com/haskell-perf/sequences/blob/master/Report.hs
It accepts a .csv file, which you can get by passing --csv out.csv
to your criterion benchmark.
There's some code in there to replace anything after <!-- RESULTS -->
in the README.md with all result tables, but you could do something else with that. Perhaps just replace a line containing <-- RESULTS -->
, or just spit it out to stdout and do what you like with it.
Just a FWIW. I think the table is a nice quick summary, but that in the case of serialization it's nice to also include the full criterion output, as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.