@@ -262,7 +262,7 @@ common exe-options
262-- XXX dependencies should be separated under bench-depends
262-- XXX dependencies should be separated under bench-depends
263common bench-options
263common bench-options
264 import: compile-options, optimization-options
264 import: compile-options, optimization-options
265− ghc-options: -with-rtsopts "-T -M256M"
265+ ghc-options: -with-rtsopts "-T -K32K -M16M"
266 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
266 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
267 ghc-options: -fplugin Fusion.Plugin
267 ghc-options: -fplugin Fusion.Plugin
268 build-depends:
268 build-depends:
@@ -273,7 +273,7 @@ common bench-options-threaded
273 import: compile-options, optimization-options
273 import: compile-options, optimization-options
274 -- -threaded and -N2 is important because some GC and space leak issues
274 -- -threaded and -N2 is important because some GC and space leak issues
275 -- trigger only with these options.
275 -- trigger only with these options.
276− ghc-options: -threaded -with-rtsopts "-T -N2 -M256M"
276+ ghc-options: -threaded -with-rtsopts "-T -N2 -K32K -M16M"
277 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
277 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
278 ghc-options: -fplugin Fusion.Plugin
278 ghc-options: -fplugin Fusion.Plugin
279 build-depends:
279 build-depends:
@@ -670,6 +670,9 @@ benchmark linear
670 import: bench-options
670 import: bench-options
671 type: exitcode-stdio-1.0
671 type: exitcode-stdio-1.0
672 hs-source-dirs: benchmark
672 hs-source-dirs: benchmark
673+ -- XXX heap/stack limits can be reduced once we split out the buffered
674+ -- benchmarks into a separate suite
675+ ghc-options: -with-rtsopts "-T -K4M -M128M"
673 main-is: Linear.hs
676 main-is: Linear.hs
674 other-modules: Streamly.Benchmark.Prelude, Common
677 other-modules: Streamly.Benchmark.Prelude, Common
675 build-depends:
678 build-depends:
@@ -689,6 +692,7 @@ benchmark nested
689 import: bench-options
692 import: bench-options
690 type: exitcode-stdio-1.0
693 type: exitcode-stdio-1.0
691 hs-source-dirs: benchmark
694 hs-source-dirs: benchmark
695+ ghc-options: -with-rtsopts "-T -K256K -M16M"
692 main-is: Nested.hs
696 main-is: Nested.hs
693 other-modules: NestedOps, Common
697 other-modules: NestedOps, Common
694 build-depends:
698 build-depends:
@@ -705,6 +709,7 @@ benchmark nested-unfold
705 import: bench-options
709 import: bench-options
706 type: exitcode-stdio-1.0
710 type: exitcode-stdio-1.0
707 hs-source-dirs: benchmark
711 hs-source-dirs: benchmark
712+ ghc-options: -with-rtsopts "-T -K64K -M16M"
708 main-is: NestedUnfold.hs
713 main-is: NestedUnfold.hs
709 other-modules: NestedUnfoldOps, Common
714 other-modules: NestedUnfoldOps, Common
710 build-depends:
715 build-depends:
@@ -721,6 +726,7 @@ benchmark unpinned-array
721 import: bench-options
726 import: bench-options
722 type: exitcode-stdio-1.0
727 type: exitcode-stdio-1.0
723 hs-source-dirs: benchmark
728 hs-source-dirs: benchmark
729+ ghc-options: -with-rtsopts "-T -K1K -M128M"
724 main-is: Streamly/Benchmark/Data/Array.hs
730 main-is: Streamly/Benchmark/Data/Array.hs
725 other-modules: Streamly.Benchmark.Data.ArrayOps
731 other-modules: Streamly.Benchmark.Data.ArrayOps
726 build-depends:
732 build-depends:
@@ -737,6 +743,7 @@ benchmark prim-array
737 import: bench-options
743 import: bench-options
738 type: exitcode-stdio-1.0
744 type: exitcode-stdio-1.0
739 hs-source-dirs: benchmark
745 hs-source-dirs: benchmark
746+ ghc-options: -with-rtsopts "-T -K64K -M32M"
740 main-is: Streamly/Benchmark/Data/Prim/Array.hs
747 main-is: Streamly/Benchmark/Data/Prim/Array.hs
741 other-modules: Streamly.Benchmark.Data.Prim.ArrayOps
748 other-modules: Streamly.Benchmark.Data.Prim.ArrayOps
742 build-depends:
749 build-depends:
@@ -753,6 +760,7 @@ benchmark small-array
753 import: bench-options
760 import: bench-options
754 type: exitcode-stdio-1.0
761 type: exitcode-stdio-1.0
755 hs-source-dirs: benchmark
762 hs-source-dirs: benchmark
763+ ghc-options: -with-rtsopts "-T -K128K -M16M"
756 main-is: Streamly/Benchmark/Data/SmallArray.hs
764 main-is: Streamly/Benchmark/Data/SmallArray.hs
757 other-modules: Streamly.Benchmark.Data.SmallArrayOps
765 other-modules: Streamly.Benchmark.Data.SmallArrayOps
758 build-depends:
766 build-depends:
@@ -769,6 +777,7 @@ benchmark array
769 import: bench-options
777 import: bench-options
770 type: exitcode-stdio-1.0
778 type: exitcode-stdio-1.0
771 hs-source-dirs: benchmark
779 hs-source-dirs: benchmark
780+ ghc-options: -with-rtsopts "-T -K64K -M128M"
772 main-is: Array.hs
781 main-is: Array.hs
773 other-modules: ArrayOps
782 other-modules: ArrayOps
774 build-depends:
783 build-depends:
@@ -809,6 +818,7 @@ benchmark linear-async
809 import: bench-options-threaded
818 import: bench-options-threaded
810 type: exitcode-stdio-1.0
819 type: exitcode-stdio-1.0
811 hs-source-dirs: benchmark
820 hs-source-dirs: benchmark
821+ ghc-options: -with-rtsopts "-T -N2 -K64K -M16M"
812 main-is: LinearAsync.hs
822 main-is: LinearAsync.hs
813 other-modules: Streamly.Benchmark.Prelude, Common
823 other-modules: Streamly.Benchmark.Prelude, Common
814 build-depends:
824 build-depends:
@@ -828,6 +838,8 @@ benchmark nested-concurrent
828 import: bench-options-threaded
838 import: bench-options-threaded
829 type: exitcode-stdio-1.0
839 type: exitcode-stdio-1.0
830 hs-source-dirs: benchmark
840 hs-source-dirs: benchmark
841+ -- XXX this can be lowered once we split out the finite benchmarks
842+ ghc-options: -with-rtsopts "-T -N2 -K256K -M128M"
831 main-is: NestedConcurrent.hs
843 main-is: NestedConcurrent.hs
832 other-modules: NestedOps, Common
844 other-modules: NestedOps, Common
833 build-depends:
845 build-depends:
@@ -844,6 +856,7 @@ benchmark parallel
844 import: bench-options-threaded
856 import: bench-options-threaded
845 type: exitcode-stdio-1.0
857 type: exitcode-stdio-1.0
846 hs-source-dirs: benchmark
858 hs-source-dirs: benchmark
859+ ghc-options: -with-rtsopts "-T -N2 -K128K -M256M"
847 main-is: Parallel.hs
860 main-is: Parallel.hs
848 other-modules: Streamly.Benchmark.Prelude, NestedOps, Common
861 other-modules: Streamly.Benchmark.Prelude, NestedOps, Common
849 build-depends:
862 build-depends:
@@ -883,14 +896,11 @@ benchmark concurrent
883 type: exitcode-stdio-1.0
896 type: exitcode-stdio-1.0
884 hs-source-dirs: benchmark
897 hs-source-dirs: benchmark
885 main-is: Concurrent.hs
898 main-is: Concurrent.hs
886− if flag(dev)
899+ ghc-options: -with-rtsopts "-T -N2 -K256K -M384M"
888− build-depends:
900+ build-depends:
889− streamly
901+ streamly
890− , base >= 4.8 && < 5
902+ , base >= 4.8 && < 5
891− , gauge >= 0.2.4 && < 0.3
903+ , gauge >= 0.2.4 && < 0.3
895-------------------------------------------------------------------------------
905-------------------------------------------------------------------------------
896-- Internal benchmarks
906-- Internal benchmarks
@@ -900,21 +910,22 @@ benchmark base
900 import: bench-options
910 import: bench-options
901 type: exitcode-stdio-1.0
911 type: exitcode-stdio-1.0
902 hs-source-dirs: benchmark
912 hs-source-dirs: benchmark
914+ cpp-options: -DDEVBUILD
915+ ghc-options: -with-rtsopts "-T -K2M -M16M"
917+ ghc-options: -with-rtsopts "-T -K128K -M16M"
903 main-is: BaseStreams.hs
918 main-is: BaseStreams.hs
904 other-modules: StreamDOps
919 other-modules: StreamDOps
905 , StreamKOps
920 , StreamKOps
906 , StreamDKOps
921 , StreamDKOps
910− build-depends:
923+ build-depends:
912 , base >= 4.8 && < 5
925 , base >= 4.8 && < 5
913 , deepseq >= 1.4.1 && < 1.5
926 , deepseq >= 1.4.1 && < 1.5
914 , random >= 1.0 && < 2.0
927 , random >= 1.0 && < 2.0
915 , gauge >= 0.2.4 && < 0.3
928 , gauge >= 0.2.4 && < 0.3
919executable nano-bench
930executable nano-bench
920 import: bench-options
931 import: bench-options
@@ -931,20 +942,16 @@ executable nano-bench
931 buildable: False
942 buildable: False
933benchmark adaptive
944benchmark adaptive
934− import: bench-options
945+ import: bench-options-threaded
935 type: exitcode-stdio-1.0
946 type: exitcode-stdio-1.0
936 hs-source-dirs: benchmark
947 hs-source-dirs: benchmark
937 main-is: Adaptive.hs
948 main-is: Adaptive.hs
938 default-language: Haskell2010
949 default-language: Haskell2010
941− build-depends:
950+ build-depends:
942− streamly
951+ streamly
943− , base >= 4.8 && < 5
952+ , base >= 4.8 && < 5
944− , gauge >= 0.2.4 && < 0.3
953+ , gauge >= 0.2.4 && < 0.3
945− , random >= 1.0 && < 2.0
954+ , random >= 1.0 && < 2.0
949executable chart
956executable chart
950 default-language: Haskell2010
957 default-language: Haskell2010