on master help sign in
Fix array comparison benchmarks
commit9b8398668abad4d25c4be127ca399a6626a766f5 authorHarendra Kumar <harendra@composewell.com> dateFri 3 Sep 2021, 14:50 (5 years ago) parent0cfd625
2 files changed+9−6
benchmark/bench-report/BenchReport.hs+7−4 bin/targets.sh+2−2
benchmark/bench-report/BenchReport.hs+7−4
@@ -185,16 +185,19 @@ showComparisons Options{..} cfg inp out =
185185 where
186186
187187 separator = if useGauge then '/' else '.'
188− dropComponent = dropWhile (== separator) . dropWhile (/= separator)
188+ dropComponent sep = dropWhile (== sep) . dropWhile (/= sep)
189189
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
190193 classifyComparison b =
191194 let b1 =
192195 if useGauge
193196 then b
194− else dropComponent b --- drop "All." at the beginning
197+ else dropComponent separator b --- drop "All." at the beginning
195198 in Just
196− ( takeWhile (/= separator) b1
197− , dropComponent b1
199+ ( takeWhile (/= '/') b1
200+ , dropComponent '/' b1 -- for tasty-bench drop up to "/"
198201 )
199202
200203------------------------------------------------------------------------------
bin/targets.sh+2−2
@@ -76,8 +76,8 @@ targets () {
7676 serial_wserial_cmp="Prelude.Serial Prelude.WSerial"
7777 serial_async_cmp="Prelude.Serial Prelude.Async"
7878 concurrent_cmp="Prelude.Async Prelude.WAsync Prelude.Ahead Prelude.Parallel"
79− array_cmp="Memory.Array Data.Array.Prim Data.Array Data.Array.Prim.Pinned"
80− pinned_array_cmp="Memory.Array Data.Array.Prim.Pinned"
79+ array_cmp="Data.Array.Foreign Data.Array.Prim Data.Array Data.Array.Prim.Pinned"
80+ pinned_array_cmp="Data.Array.Foreign Data.Array.Prim.Pinned"
8181 base_parser_cmp=$base_parser_grp
8282
8383 COMPARISONS="\