containers-benchmark 1.0.0.3 → 1.1.0.0
raw patch · 13 files changed
+62/−24 lines, 13 filesdep +deepseqdep +ghc-primdep ~containers
Dependencies added: deepseq, ghc-prim
Dependency ranges changed: containers
Files
- CHANGES +5/−0
- containers-benchmark.cabal +17/−4
- scripts/custom_containers.sh +3/−8
- scripts/ghc.sh +18/−8
- src/Benchmark/Map-like.inc.hs +2/−2
- src/Benchmark/Set-like.inc.hs +2/−2
- src/Container/IntMap/Base.hs +1/−0
- src/Container/IntMap/Lazy.hs +3/−0
- src/Container/IntMap/Strict.hs +3/−0
- src/Container/Map/Base.hs +1/−0
- src/Container/Map/Lazy.hs +3/−0
- src/Container/Map/Strict.hs +3/−0
- src/Container/StrictPair.hs +1/−0
CHANGES view
@@ -1,3 +1,8 @@+= Version 1.1.0.0, 2011-11-28 =+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^+* Updates for containers 0.5.0.0.++ = Version 1.0.0.3, 2011-04-19 = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Convert the repository to Git.
containers-benchmark.cabal view
@@ -1,5 +1,5 @@ Name: containers-benchmark-Version: 1.0.0.3+Version: 1.1.0.0 Synopsis: Extensive benchmark suite for containers package. Description: This package evaluates performance of a containers package from multiple perspectives.@@ -18,7 +18,7 @@ Stability: Experimental Category: Benchmarking Build-type: Simple-Cabal-version: >=1.2+Cabal-version: >=1.6 Extra-source-files: CHANGES README scripts/benchmark.sh@@ -36,18 +36,31 @@ src/Benchmark/Set-like.inc.hs src/Variants/gen.sh +source-repository head+ type: git+ location: http://git.auryn.cz/haskell/containers-benchmark/+ Executable benchmark Main-is: Main.hs Build-depends: base >= 3 && < 5, bytestring >= 0.9 && < 1.0,- containers >= 0.3 && < 0.5,+ containers >= 0.5 && < 0.6, criterion >= 0.5 && < 0.6,- random >= 1.0 && < 1.1+ random >= 1.0 && < 1.1,+ deepseq,+ ghc-prim Hs-source-dirs: src Other-modules: Container.IntMap+ Container.IntMap.Base+ Container.IntMap.Lazy+ Container.IntMap.Strict Container.IntSet Container.Map+ Container.Map.Base+ Container.Map.Lazy+ Container.Map.Strict Container.Set+ Container.StrictPair InputData.ByteString InputData.Int InputData.IntegerBig
scripts/custom_containers.sh view
@@ -6,15 +6,9 @@ set -e -FLAGS=-O2-if grep -q '0\.3\.0\.0' $1/containers.cabal-then- FLAGS="$FLAGS -cpp -XMagicHash"-else- FLAGS="$FLAGS -fregs-graph"-fi+FLAGS="-O2" -for c in Map Set IntMap IntSet+for c in Map Map/Base Map/Lazy Map/Strict Set IntMap IntMap/Base IntMap/Lazy IntMap/Strict IntSet StrictPair do cat "$1/Data/$c.hs" | sed ' 1i\@@ -23,5 +17,6 @@ s/Data\.IntSet/Container.IntSet/ s/Data\.Map/Container.Map/ s/Data\.Set/Container.Set/+ s/Data\.StrictPair/Container.StrictPair/ ' >../src/Container/$c.hs done
scripts/ghc.sh view
@@ -11,12 +11,22 @@ [ -n "$3" ] || { usage; exit 1; } # 1) get ready the GHC source tree-cp "$1/containers.cabal" "$2/libraries/containers/"-cp "$1/Data/IntMap.hs" "$2/libraries/containers/Data/"-cp "$1/Data/IntSet.hs" "$2/libraries/containers/Data/"-cp "$1/Data/Map.hs" "$2/libraries/containers/Data/"-cp "$1/Data/Set.hs" "$2/libraries/containers/Data/"+[ -d "$2/libraries/containers/Data/IntMap/" ] || mkdir "$2/libraries/containers/Data/IntMap/"+[ -d "$2/libraries/containers/Data/Map/" ] || mkdir "$2/libraries/containers/Data/Map/" +cp "$1/containers.cabal" "$2/libraries/containers/"+cp "$1/Data/IntMap.hs" "$2/libraries/containers/Data/"+cp "$1/Data/IntMap/Base.hs" "$2/libraries/containers/Data/IntMap/"+cp "$1/Data/IntMap/Lazy.hs" "$2/libraries/containers/Data/IntMap/"+cp "$1/Data/IntMap/Strict.hs" "$2/libraries/containers/Data/IntMap/"+cp "$1/Data/IntSet.hs" "$2/libraries/containers/Data/"+cp "$1/Data/Map.hs" "$2/libraries/containers/Data/"+cp "$1/Data/Map/Base.hs" "$2/libraries/containers/Data/Map/"+cp "$1/Data/Map/Lazy.hs" "$2/libraries/containers/Data/Map/"+cp "$1/Data/Map/Strict.hs" "$2/libraries/containers/Data/Map/"+cp "$1/Data/Set.hs" "$2/libraries/containers/Data/"+cp "$1/Data/StrictPair.hs" "$2/libraries/containers/Data/"+ # 2) build GHC (cd "$2" && make -j4) @@ -30,9 +40,9 @@ rm /tmp/ghc-stage2 echo -e "\nTest;Bytes allocated" >> "$3"-(cd "$2/testsuite/tests/ghc-regress/perf/compiler/" && make)-for t in T1969 T3294+(cd "$2/testsuite/tests/perf/compiler/" && make)+for t in T1969 T3064 T3294 T4801 T5030 do echo -n "$t;" >> "$3"- sed -n 's/^.*bytes allocated.*"\([0-9]*\)".*$/\1/;T;p' "$2/testsuite/tests/ghc-regress/perf/compiler/$t.comp.stats" >> "$3"+ sed -n 's/^.*bytes allocated.*"\([0-9]*\)".*$/\1/;T;p' "$2/testsuite/tests/perf/compiler/$t.comp.stats" >> "$3" done
src/Benchmark/Map-like.inc.hs view
@@ -50,9 +50,9 @@ bench_intersection (_, c, c_even, _) = C.intersection c c_even `seq` () -bench_foldlist (_, c, _, _) = force $ C.fold (:) [] c+bench_foldlist (_, c, _, _) = force $ C.foldr (:) [] c where force list = length list `seq` () #ifdef FOLD_SUM-bench_foldsum (_, c, _, _) = C.fold (+) 0 c `seq` ()+bench_foldsum (_, c, _, _) = C.foldl' (+) 0 c `seq` () #endif
src/Benchmark/Set-like.inc.hs view
@@ -40,9 +40,9 @@ bench_intersection (_, c, c_even, _) = C.intersection c c_even `seq` () -bench_foldlist (_, c, _, _) = force $ C.fold (:) [] c+bench_foldlist (_, c, _, _) = force $ C.foldr (:) [] c where force list = length list `seq` () #ifdef FOLD_SUM-bench_foldsum (_, c, _, _) = C.fold (+) 0 c `seq` ()+bench_foldsum (_, c, _, _) = C.foldl' (+) 0 c `seq` () #endif
+ src/Container/IntMap/Base.hs view
@@ -0,0 +1,1 @@+module Container.IntMap.Base () where
+ src/Container/IntMap/Lazy.hs view
@@ -0,0 +1,3 @@+module Container.IntMap.Lazy (module Data.Map.Lazy) where++import Data.IntMap.Lazy
+ src/Container/IntMap/Strict.hs view
@@ -0,0 +1,3 @@+module Container.IntMap.Strict (module Data.Map.Strict) where++import Data.IntMap.Strict
+ src/Container/Map/Base.hs view
@@ -0,0 +1,1 @@+module Container.Map.Base () where
+ src/Container/Map/Lazy.hs view
@@ -0,0 +1,3 @@+module Container.Map.Lazy (module Data.Map.Lazy) where++import Data.Map.Lazy
+ src/Container/Map/Strict.hs view
@@ -0,0 +1,3 @@+module Container.Map.Strict (module Data.Map.Strict) where++import Data.Map.Strict
+ src/Container/StrictPair.hs view
@@ -0,0 +1,1 @@+module Container.StrictPair () where