@@ -95,55 +95,6 @@ common optimization-options
95common lib-options
95common lib-options
96 import: compile-options, optimization-options
96 import: compile-options, optimization-options
98−-------------------------------------------------------------------------------
100−-------------------------------------------------------------------------------
109− -- Core libraries shipped with ghc, the min and max
110− -- constraints of these libraries should match with
111− -- the GHC versions we support
113− , deepseq >= 1.4.1 && < 1.5
117− , gauge >= 0.2.4 && < 0.3
118− , random >= 1.0 && < 2.0
124− Streamly.Benchmark.Prelude
126− -- Core libraries shipped with ghc, the min and max
127− -- constraints of these libraries should match with
128− -- the GHC versions we support
130− , deepseq >= 1.4.1 && < 1.5
136− build-depends: template-haskell >= 2.14 && < 2.16
137− , inspection-testing >= 0.4 && < 0.5
138− -- Array uses a Storable constraint in dev build making several inspection
140− if flag(dev) && flag(inspection)
141− build-depends: inspection-and-dev-flags-cannot-be-used-together
143−-------------------------------------------------------------------------------
145−-------------------------------------------------------------------------------
147common bench-depends
98common bench-depends
148 build-depends:
99 build-depends:
149 -- Core libraries shipped with ghc, the min and max
100 -- Core libraries shipped with ghc, the min and max
@@ -154,7 +105,6 @@ common bench-depends
154 , mtl >= 2.2 && < 3
105 , mtl >= 2.2 && < 3
156 -- other libraries
107 -- other libraries
157− , streamly-benchmarks
158 , streamly >= 0.7.0
108 , streamly >= 0.7.0
159 , random >= 1.0 && < 2.0
109 , random >= 1.0 && < 2.0
160 , gauge >= 0.2.4 && < 0.3
110 , gauge >= 0.2.4 && < 0.3
@@ -167,6 +117,25 @@ common bench-depends
167 if flag(inspection)
117 if flag(inspection)
168 build-depends: template-haskell >= 2.14 && < 2.16
118 build-depends: template-haskell >= 2.14 && < 2.16
169 , inspection-testing >= 0.4 && < 0.5
119 , inspection-testing >= 0.4 && < 0.5
120+ -- Array uses a Storable constraint in dev build making several inspection
122+ if flag(dev) && flag(inspection)
123+ build-depends: inspection-and-dev-flags-cannot-be-used-together
125+-------------------------------------------------------------------------------
127+-------------------------------------------------------------------------------
130+ import: lib-options, bench-depends
133+ Streamly.Benchmark.Common
134+ , Streamly.Benchmark.Prelude
136+-------------------------------------------------------------------------------
138+-------------------------------------------------------------------------------
171-- Whatever stack size below 32K we use GHC seems to report the stack size as
140-- Whatever stack size below 32K we use GHC seems to report the stack size as
172-- 32K at crash. Even K0K works. Therefore it probably does not make sense to
141-- 32K at crash. Even K0K works. Therefore it probably does not make sense to
@@ -175,6 +144,8 @@ common bench-depends
175common bench-options
144common bench-options
176 import: compile-options, optimization-options, bench-depends
145 import: compile-options, optimization-options, bench-depends
177 ghc-options: -with-rtsopts "-T -K32K -M16M"
146 ghc-options: -with-rtsopts "-T -K32K -M16M"
147+ build-depends: streamly-benchmarks
179-- Some benchmarks are threaded some are not
150-- Some benchmarks are threaded some are not
180common bench-options-threaded
151common bench-options-threaded
@@ -182,6 +153,8 @@ common bench-options-threaded
182 -- -threaded and -N2 is important because some GC and space leak issues
153 -- -threaded and -N2 is important because some GC and space leak issues
183 -- trigger only with these options.
154 -- trigger only with these options.
184 ghc-options: -threaded -with-rtsopts "-T -N2 -K32K -M16M"
155 ghc-options: -threaded -with-rtsopts "-T -N2 -K32K -M16M"
156+ build-depends: streamly-benchmarks
186-------------------------------------------------------------------------------
159-------------------------------------------------------------------------------
187-- Serial Streams
160-- Serial Streams
@@ -192,50 +165,36 @@ benchmark linear
192 import: bench-options
165 import: bench-options
193 type: exitcode-stdio-1.0
166 type: exitcode-stdio-1.0
194 ghc-options: -with-rtsopts "-T -K36K -M16M"
167 ghc-options: -with-rtsopts "-T -K36K -M16M"
196− main-is: Prelude/Serial/O_1_Space.hs
168+ main-is: Streamly/Benchmark/Prelude/Serial/O_1_Space.hs
200benchmark serial-O-n-heap
170benchmark serial-O-n-heap
201 import: bench-options
171 import: bench-options
202 type: exitcode-stdio-1.0
172 type: exitcode-stdio-1.0
203 ghc-options: -with-rtsopts "-T -K36K -M128M"
173 ghc-options: -with-rtsopts "-T -K36K -M128M"
205− main-is: Prelude/Serial/O_n_Heap.hs
174+ main-is: Streamly/Benchmark/Prelude/Serial/O_n_Heap.hs
209benchmark serial-O-n-stack
176benchmark serial-O-n-stack
210 import: bench-options
177 import: bench-options
211 type: exitcode-stdio-1.0
178 type: exitcode-stdio-1.0
212 ghc-options: -with-rtsopts "-T -K1M -M16M"
179 ghc-options: -with-rtsopts "-T -K1M -M16M"
214− main-is: Prelude/Serial/O_n_Stack.hs
180+ main-is: Streamly/Benchmark/Prelude/Serial/O_n_Stack.hs
218benchmark serial-O-n-space
182benchmark serial-O-n-space
219 import: bench-options
183 import: bench-options
220 type: exitcode-stdio-1.0
184 type: exitcode-stdio-1.0
221 ghc-options: -with-rtsopts "-T -K16M -M64M"
185 ghc-options: -with-rtsopts "-T -K16M -M64M"
223− main-is: Prelude/Serial/O_n_Space.hs
186+ main-is: Streamly/Benchmark/Prelude/Serial/O_n_Space.hs
227benchmark nested
188benchmark nested
228 import: bench-options
189 import: bench-options
229 type: exitcode-stdio-1.0
190 type: exitcode-stdio-1.0
230 ghc-options: -with-rtsopts "-T -K256K -M16M"
191 ghc-options: -with-rtsopts "-T -K256K -M16M"
232 main-is: Nested.hs
192 main-is: Nested.hs
233 other-modules: NestedOps
193 other-modules: NestedOps
235benchmark nested-unfold
195benchmark nested-unfold
236 import: bench-options
196 import: bench-options
237 type: exitcode-stdio-1.0
197 type: exitcode-stdio-1.0
239 ghc-options: -with-rtsopts "-T -K64K -M16M"
198 ghc-options: -with-rtsopts "-T -K64K -M16M"
240 main-is: NestedUnfold.hs
199 main-is: NestedUnfold.hs
241 other-modules: NestedUnfoldOps
200 other-modules: NestedUnfoldOps
@@ -243,7 +202,6 @@ benchmark nested-unfold
243benchmark base
202benchmark base
244 import: bench-options
203 import: bench-options
245 type: exitcode-stdio-1.0
204 type: exitcode-stdio-1.0
247 if flag(dev)
205 if flag(dev)
248 cpp-options: -DDEVBUILD
206 cpp-options: -DDEVBUILD
249 ghc-options: -with-rtsopts "-T -K2M -M16M"
207 ghc-options: -with-rtsopts "-T -K2M -M16M"
@@ -256,7 +214,6 @@ benchmark base
257executable nano-bench
215executable nano-bench
258 import: bench-options
216 import: bench-options
260 main-is: NanoBenchmarks.hs
217 main-is: NanoBenchmarks.hs
261 if flag(dev)
218 if flag(dev)
262 buildable: True
219 buildable: True
@@ -270,16 +227,12 @@ executable nano-bench
270benchmark linear-async
227benchmark linear-async
271 import: bench-options-threaded
228 import: bench-options-threaded
272 type: exitcode-stdio-1.0
229 type: exitcode-stdio-1.0
274 ghc-options: -with-rtsopts "-T -N2 -K64K -M16M"
230 ghc-options: -with-rtsopts "-T -N2 -K64K -M16M"
275 main-is: LinearAsync.hs
231 main-is: LinearAsync.hs
279benchmark nested-concurrent
233benchmark nested-concurrent
280 import: bench-options-threaded
234 import: bench-options-threaded
281 type: exitcode-stdio-1.0
235 type: exitcode-stdio-1.0
283 -- XXX this can be lowered once we split out the finite benchmarks
236 -- XXX this can be lowered once we split out the finite benchmarks
284 ghc-options: -with-rtsopts "-T -N2 -K256K -M128M"
237 ghc-options: -with-rtsopts "-T -N2 -K256K -M128M"
285 main-is: NestedConcurrent.hs
238 main-is: NestedConcurrent.hs
@@ -288,39 +241,25 @@ benchmark nested-concurrent
288benchmark parallel
241benchmark parallel
289 import: bench-options-threaded
242 import: bench-options-threaded
290 type: exitcode-stdio-1.0
243 type: exitcode-stdio-1.0
292 ghc-options: -with-rtsopts "-T -N2 -K128K -M256M"
244 ghc-options: -with-rtsopts "-T -N2 -K128K -M256M"
293 main-is: Parallel.hs
245 main-is: Parallel.hs
294 other-modules: NestedOps
246 other-modules: NestedOps
298benchmark concurrent
248benchmark concurrent
299 import: bench-options-threaded
249 import: bench-options-threaded
300 type: exitcode-stdio-1.0
250 type: exitcode-stdio-1.0
302 main-is: Concurrent.hs
251 main-is: Concurrent.hs
303 ghc-options: -with-rtsopts "-T -N2 -K256K -M384M"
252 ghc-options: -with-rtsopts "-T -N2 -K256K -M384M"
305benchmark adaptive
254benchmark adaptive
306 import: bench-options-threaded
255 import: bench-options-threaded
307 type: exitcode-stdio-1.0
256 type: exitcode-stdio-1.0
309 main-is: Adaptive.hs
257 main-is: Adaptive.hs
310− default-language: Haskell2010
313− , base >= 4.8 && < 5
314− , gauge >= 0.2.4 && < 0.3
315− , random >= 1.0 && < 2.0
317benchmark linear-rate
259benchmark linear-rate
318 import: bench-options-threaded
260 import: bench-options-threaded
319 type: exitcode-stdio-1.0
261 type: exitcode-stdio-1.0
321 main-is: LinearRate.hs
262 main-is: LinearRate.hs
325-------------------------------------------------------------------------------
264-------------------------------------------------------------------------------
326-- Array Benchmarks
265-- Array Benchmarks
@@ -329,7 +268,6 @@ benchmark linear-rate
329benchmark unpinned-array
268benchmark unpinned-array
330 import: bench-options
269 import: bench-options
331 type: exitcode-stdio-1.0
270 type: exitcode-stdio-1.0
333 ghc-options: -with-rtsopts "-T -K1K -M128M"
271 ghc-options: -with-rtsopts "-T -K1K -M128M"
334 main-is: Streamly/Benchmark/Data/Array.hs
272 main-is: Streamly/Benchmark/Data/Array.hs
335 other-modules: Streamly.Benchmark.Data.ArrayOps
273 other-modules: Streamly.Benchmark.Data.ArrayOps
@@ -337,7 +275,6 @@ benchmark unpinned-array
337benchmark prim-array
275benchmark prim-array
338 import: bench-options
276 import: bench-options
339 type: exitcode-stdio-1.0
277 type: exitcode-stdio-1.0
341 ghc-options: -with-rtsopts "-T -K64K -M32M"
278 ghc-options: -with-rtsopts "-T -K64K -M32M"
342 main-is: Streamly/Benchmark/Data/Prim/Array.hs
279 main-is: Streamly/Benchmark/Data/Prim/Array.hs
343 other-modules: Streamly.Benchmark.Data.Prim.ArrayOps
280 other-modules: Streamly.Benchmark.Data.Prim.ArrayOps
@@ -345,7 +282,6 @@ benchmark prim-array
345benchmark small-array
282benchmark small-array
346 import: bench-options
283 import: bench-options
347 type: exitcode-stdio-1.0
284 type: exitcode-stdio-1.0
349 ghc-options: -with-rtsopts "-T -K128K -M16M"
285 ghc-options: -with-rtsopts "-T -K128K -M16M"
350 main-is: Streamly/Benchmark/Data/SmallArray.hs
286 main-is: Streamly/Benchmark/Data/SmallArray.hs
351 other-modules: Streamly.Benchmark.Data.SmallArrayOps
287 other-modules: Streamly.Benchmark.Data.SmallArrayOps
@@ -353,7 +289,6 @@ benchmark small-array
353benchmark array
289benchmark array
354 import: bench-options
290 import: bench-options
355 type: exitcode-stdio-1.0
291 type: exitcode-stdio-1.0
357 ghc-options: -with-rtsopts "-T -K64K -M128M"
292 ghc-options: -with-rtsopts "-T -K64K -M128M"
358 main-is: Array.hs
293 main-is: Array.hs
359 other-modules: ArrayOps
294 other-modules: ArrayOps
@@ -365,7 +300,6 @@ benchmark array
365benchmark fileio
300benchmark fileio
366 import: bench-options
301 import: bench-options
367 type: exitcode-stdio-1.0
302 type: exitcode-stdio-1.0
369 main-is: FileIO.hs
303 main-is: FileIO.hs
370 other-modules: Streamly.Benchmark.FileIO.Array
304 other-modules: Streamly.Benchmark.FileIO.Array
371 , Streamly.Benchmark.FileIO.Stream
305 , Streamly.Benchmark.FileIO.Stream
@@ -379,7 +313,6 @@ benchmark fileio
379executable chart
313executable chart
380 default-language: Haskell2010
314 default-language: Haskell2010
381 ghc-options: -Wall
315 ghc-options: -Wall
383 main-is: Chart.hs
316 main-is: Chart.hs
384 if flag(dev) && !flag(no-charts) && !impl(ghcjs)
317 if flag(dev) && !flag(no-charts) && !impl(ghcjs)
385 buildable: True
318 buildable: True