Code Monkey home page Code Monkey logo

serialization's People

Contributors

minad avatar osa1 avatar tittoassini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

serialization's Issues

Serialization benchmarks are invalid

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!

GHCJS benchmarks / support

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.

Output table

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.