This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.ByteString as S | |
import qualified Data.ByteString.Lazy as L | |
import Blaze.ByteString.Builder | |
import Blaze.ByteString.Builder.Char.Utf8 (fromString) | |
import Data.Monoid | |
infixl 4 <> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
running benchmarks for 1 chunk size in bytes | |
collecting 100 samples, 1 iterations each, in estimated 24.22919 s | |
collecting 100 samples, 1 iterations each, in estimated 4.534197 s | |
collecting 100 samples, 1 iterations each, in estimated 5.621886 s | |
ranking for 1 chunk size in bytes | |
1. compaction only: mean 3.469537 ms (2p 3.352643 ms, 98p 4.173089 ms, out 10) | |
2. with compaction: mean 6.508811 ms (2p 6.260396 ms, 98p 7.141438 ms, out 4) | |
3. direct: mean 138.4184 ms (2p 128.6385 ms, 98p 154.6016 ms, out 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─(simon@bumped)-(~/repositories/git/github/meiersi/aeson/benchmarks)-(master ?) | |
└─╼ ./AesonEncodeOld 500 json-data/*.json | |
json-data/example.json: | |
0.047853s | |
10449 per second | |
json-data/integers.json: | |
0.123015s | |
4065 per second | |
json-data/jp100.json: | |
0.937498s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Required for the MaybeC example below. | |
{-# LANGUAGE Rank2Types #-} | |
-- | HaskellerZ sketch-book from Juli 11th, 2011 | |
module HaskellerZ where | |
import qualified Data.Map as M | |
import Control.Monad.State | |
import Control.Monad.Identity() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
benchmarking decode/en/aeson | |
mean: 1.549123 ms, lb 1.519203 ms, ub 1.589703 ms, ci 0.950 | |
std dev: 177.1128 us, lb 137.1106 us, ub 225.7957 us, ci 0.950 | |
found 10 outliers among 100 samples (10.0%) | |
3 (3.0%) high mild | |
7 (7.0%) high severe | |
variance introduced by outliers: 83.157% | |
variance is severely inflated by outliers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./dist/build/bench-bytestring-builder/bench-bytestring-builder snoyman | |
Sanity checks: | |
lengths of input data: [10001,10001,10001,10001,10001,10001,10001] | |
warming up | |
estimating clock resolution... | |
mean is 5.480878 us (160001 iterations) | |
found 3843 outliers among 159999 samples (2.4%) | |
3403 (2.1%) high severe | |
estimating cost of a clock call... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
└─╼ ./cabal-dev/bin/cereal-bench | |
Sanity checks: | |
lengths of input data: [11,11,11,11,11,11,11] | |
cereal :/[Int]: 96 | |
binary :/[Int]: 96 | |
new builder :/[Int]: 100 | |
new builder2:/[Int]: 96 | |
cereal :/[String]: 138 | |
binary :/[String]: 138 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | | |
-- Copyright : (c) 2012 Simon Meier | |
-- License : BSD3-style (see LICENSE) | |
-- | |
-- Maintainer : Simon Meier <iridcode@gmail.com> | |
-- Stability : experimental | |
-- Portability : tested on GHC only | |
-- | |
-- Benchmark decimal encoding speed of 10 million integers. | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Copyright : (c) 2012 Michael Snoyman, Simon Meier | |
-- License : BSD3-style (see LICENSE) | |
-- | |
-- Maintainer : Simon Meier <iridcode@gmail.com> | |
-- Stability : experimental | |
-- Portability : tested on GHC only | |
-- | |
-- Benchmark hexadecimal encoding speed. Use the preview repository of the new | |
-- bytestring builder to test this code: | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
benchmarked against: https://github.com/meiersi/blaze-binary/commit/d2bc3f004f608ebdd1eece624f288a263753bb36 | |
and https://github.com/kolmodin/binary/commit/abbf46373620b45caca64e1072b300379e9c0fa1 | |
warming up | |
estimating clock resolution... | |
mean is 1.466016 us (640001 iterations) | |
found 3590 outliers among 639999 samples (0.6%) | |
2943 (0.5%) high severe | |
estimating cost of a clock call... | |
mean is 36.12254 ns (13 iterations) |
OlderNewer