[commit: packages/binary] master: Add benchmark for Generic generated Binary instances. (6ab893a)

git at git.haskell.org git at git.haskell.org
Wed Dec 16 09:42:59 UTC 2015


Repository : ssh://git@git.haskell.org/binary

On branch  : master
Link       : http://git.haskell.org/packages/binary.git/commitdiff/6ab893a8decbabacb3a7c076d9d2f427ed07902c

>---------------------------------------------------------------

commit 6ab893a8decbabacb3a7c076d9d2f427ed07902c
Author: Lennart Kolmodin <kolmodin at google.com>
Date:   Thu Aug 13 22:25:19 2015 +0200

    Add benchmark for Generic generated Binary instances.
    
    We use Cabal's PackageDescription as the type to serialize. It is large,
    has many levels of data types, and also uses enums and strings. It's a
    good stress test.
    
    GenericsBench defines criterion benchmarks for serialization and
    deserialization.
    
    In GenericsBenchTypes we derive the Binary instances. PackageDescription
    already defines Binary instances for the system installed Binary, but
    naturally this won't work for the benchmark - we need our own instances
    that are derived from the code in this library.
    
    The data to serialize we get from your
    .cabal/package/hackage.haskell.org/ directory, it's data from hackage,
    not autogenerated.
    GenericsBenchCache makes sure that if we rerun the benchmark we will use
    the same PackageDescriptions, even if the user has executed
    'cabal update' since the last benchmark run.


>---------------------------------------------------------------

6ab893a8decbabacb3a7c076d9d2f427ed07902c
 benchmarks/GenericsBench.hs      | 52 ++++++++++++++++++++++++
 benchmarks/GenericsBenchCache.hs | 86 ++++++++++++++++++++++++++++++++++++++++
 benchmarks/GenericsBenchTypes.hs | 47 ++++++++++++++++++++++
 binary.cabal                     | 27 +++++++++++++
 4 files changed, 212 insertions(+)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 6ab893a8decbabacb3a7c076d9d2f427ed07902c


More information about the ghc-commits mailing list