on master help sign in
Fix array comparison benchmarks
9b83986Harendra Kumar
benchmark/bench-report/BenchReport.hs+7−4
@@ -185,16 +185,19 @@ showComparisons Options{..} cfg inp out =
185 where
185 where
186
186
187 separator = if useGauge then '/' else '.'
187 separator = if useGauge then '/' else '.'
188− dropComponent = dropWhile (== separator) . dropWhile (/= separator)
188+ dropComponent sep = dropWhile (== sep) . dropWhile (/= sep)
189
189
190+ -- In case of tasty-bench the names could be like
191+ -- All.Data.Array.Prim.Pinned/o-1-space.generation.show
192+ -- All.Data.Array.Foreign/o-1-space.generation.show
190 classifyComparison b =
193 classifyComparison b =
191 let b1 =
194 let b1 =
192 if useGauge
195 if useGauge
193 then b
196 then b
194− else dropComponent b --- drop "All." at the beginning
197+ else dropComponent separator b --- drop "All." at the beginning
195 in Just
198 in Just
196− ( takeWhile (/= separator) b1
199+ ( takeWhile (/= '/') b1
197− , dropComponent b1
200+ , dropComponent '/' b1 -- for tasty-bench drop up to "/"
198 )
201 )
199
202
200------------------------------------------------------------------------------
203------------------------------------------------------------------------------
bin/targets.sh+2−2
@@ -76,8 +76,8 @@ targets () {
76 serial_wserial_cmp="Prelude.Serial Prelude.WSerial"
76 serial_wserial_cmp="Prelude.Serial Prelude.WSerial"
77 serial_async_cmp="Prelude.Serial Prelude.Async"
77 serial_async_cmp="Prelude.Serial Prelude.Async"
78 concurrent_cmp="Prelude.Async Prelude.WAsync Prelude.Ahead Prelude.Parallel"
78 concurrent_cmp="Prelude.Async Prelude.WAsync Prelude.Ahead Prelude.Parallel"
79− array_cmp="Memory.Array Data.Array.Prim Data.Array Data.Array.Prim.Pinned"
79+ array_cmp="Data.Array.Foreign Data.Array.Prim Data.Array Data.Array.Prim.Pinned"
80− pinned_array_cmp="Memory.Array Data.Array.Prim.Pinned"
80+ pinned_array_cmp="Data.Array.Foreign Data.Array.Prim.Pinned"
81 base_parser_cmp=$base_parser_grp
81 base_parser_cmp=$base_parser_grp
82
82
83 COMPARISONS="\
83 COMPARISONS="\