1module Main (main) where
3import BenchRunner (mainWith)
4import BuildLib (Quickness(..))
5import Control.Applicative ((<|>))
6import Data.List (isInfixOf, isPrefixOf, isSuffixOf)
8import Targets (targets)
10rtsOpts :: String -> String -> String
11rtsOpts exeName benchName0 = unwords [general, exeSpecific, benchSpecific]
16 benchName = drop 4 benchName0
19 -- GHC-9.6 requires 32M heap vs 16M for GHC-9.4
20 | "o-1-sp" `isInfixOf` benchName = "-K36K -M32M"
21 | "o-n-h" `isInfixOf` benchName = "-K36K -M32M"
22 -- GHC-9.6 requires 32M heap vs 16M for GHC-9.4
23 | "o-n-st" `isInfixOf` benchName = "-K1M -M32M"
24 | "o-n-sp" `isInfixOf` benchName = "-K1M -M32M"
28 | "Prelude.Concurrent" `isSuffixOf` exeName = "-K512K -M384M"
32 -- GHC-9.6 requires 64M, earlier it was 16M
33 | "Data.Fold/o-n-heap.key-value.toHashMapIO (max buckets) sum" == benchName =
36 -- This is required only for the --long case because we allocate all
37 -- the arrays upfront. depends on the size of the stream.
38 | "Data.Parser/o-1-space" `isPrefixOf` benchName =
41 -----------------------------------------------------------------------
43 | "Prelude.Parallel/o-n-heap.mapping.mapM" == benchName = "-M256M"
44 | "Prelude.Parallel/o-n-heap.monad-outer-product."
45 `isPrefixOf` benchName = "-M256M"
46 | "Prelude.Parallel/o-n-space.monad-outer-product."
47 `isPrefixOf` benchName = "-K2M -M256M"
48 | "Prelude.Rate/o-1-space." `isPrefixOf` benchName = "-K128K"
49 | "Prelude.Rate/o-1-space.asyncly." `isPrefixOf` benchName = "-K128K"
50 | "Prelude.WSerial/o-n-space." `isPrefixOf` benchName = "-K4M"
51 | "Prelude.Async/o-n-space.monad-outer-product." `isPrefixOf` benchName =
53 | "Prelude.Ahead/o-1-space.monad-outer-product." `isPrefixOf` benchName =
55 | "Prelude.Ahead/o-1-space." `isPrefixOf` benchName = "-K128K"
56 | "Prelude.Ahead/o-n-space.monad-outer-product." `isPrefixOf` benchName =
58 | "Prelude.WAsync/o-n-heap.monad-outer-product.toNull3" == benchName =
60 | "Prelude.WAsync/o-n-space.monad-outer-product." `isPrefixOf` benchName =
63 -- This module is dev only now, and can be removed at some point
64 | "Data.Stream.StreamDK/o-1-space.grouping.classifySessionsOf"
65 `isPrefixOf` benchName = "-K512K"
66 | "Data.Stream.StreamDK/o-n-space.foldr.foldrM/"
67 `isPrefixOf` benchName = "-K4M"
68 | "Data.Stream.StreamDK/o-n-space.iterated."
69 `isPrefixOf` benchName = "-K4M -M64M"
70 -- GHC 9.4.4 requires 4M
71 | "Data.Stream.StreamDK/o-n-space.traversable."
72 `isPrefixOf` benchName = "-K4M"
73 -- GHC-9.6 requires 64M, earlier it was 32M
74 | "Data.Stream.StreamDK/o-n-heap.buffered.readsPrec pure streams" == benchName =
76 -- GHC-9.6 requires 64M, earlier it was 32M
77 | "Data.Stream.StreamDK/o-n-heap.buffered.showPrec Haskell lists" == benchName =
80 -----------------------------------------------------------------------
82 | "Data.StreamD/o-n-space.elimination.toList" == benchName =
84 | "Data.StreamK/o-n-space.elimination.toList" == benchName =
87 -----------------------------------------------------------------------
89 | "Data.Stream/o-1-space.grouping.classifySessionsOf"
90 `isPrefixOf` benchName = "-K512K"
91 | "Data.Stream/o-n-space.foldr.foldrM/"
92 `isPrefixOf` benchName = "-K4M"
93 | "Data.Stream/o-n-space.iterated."
94 `isPrefixOf` benchName = "-K4M"
96 -- GHC-9.6 requires 64M, earlier it was 32M
97 | "Data.Stream/o-n-heap.buffered.showPrec Haskell lists" == benchName =
99 -- GHC-9.6 requires 64M, earlier it was 32M
100 | "Data.Stream/o-n-heap.buffered.readsPrec pure streams" == benchName =
103 | "Data.Stream.ConcurrentEager/o-n-heap.monad-outer-product.toNullAp"
104 `isPrefixOf` benchName = "-M1024M"
105 | "Data.Stream.ConcurrentEager/o-1-space."
106 `isPrefixOf` benchName = "-M128M"
108 | "Data.Stream.ConcurrentOrdered/o-1-space.concat-foldable.foldMapWith"
109 `isPrefixOf` benchName = "-K128K"
111 ----------------------------------------------------------------------
113 | "Data.Array" `isPrefixOf` benchName
114 && "/o-1-space.generation.read" `isSuffixOf` benchName = "-M32M"
115 -- XXX GHC 9.6 onwards needs 64M, earlier it was 32M
116 | "Data.Array" `isPrefixOf` benchName
117 && "/o-1-space.generation.show" `isSuffixOf` benchName = "-M64M"
118 -- XXX GHC 9.6 onwards needs 64M, earlier it was 32M
119 | "Data.Array.Generic/o-1-space.transformationX4.map"
120 `isPrefixOf` benchName = "-M64M"
122 -- XXX For --long option, need to check why so much heap is required.
123 -- Note, if we remove the chunked stream module we need to keep the
124 -- chunked stream benchmarks in the stream module.
125 | "Data.Array.Stream/o-1-space"
126 `isPrefixOf` benchName = "-K4M -M512M"
127 -- XXX Takes up to 160MB heap for --long, we use chunked stream for
128 -- this, so the reason may be related to chunked streams.
129 | "Data.ParserK/o-1-space"
130 `isPrefixOf` benchName = "-K4M -M256M"
132 -----------------------------------------------------------------------
134 | "Unicode.Char/o-1-space." `isPrefixOf` benchName = "-M32M"
138speedOpts :: String -> String -> Maybe Quickness
139speedOpts exeName benchName0 = exeSpecific <|> benchSpecific
143 -- slowestOf Quicker _ = Quicker
144 -- slowestOf _ Quicker = Quicker
145 -- slowestOf _ _ = SuperQuick
148 benchName = drop 4 benchName0
150 | "Prelude.Concurrent" == exeName = Just SuperQuick
151 | "Prelude.Rate" == exeName = Just SuperQuick
152 | "Prelude.Adaptive" == exeName = Just SuperQuick
153 | otherwise = Nothing
155 | "Prelude.Parallel/o-n-heap.mapping.mapM" == benchName =
157 | "Prelude.Parallel/o-n-heap.monad-outer-product."
158 `isPrefixOf` benchName = Just SuperQuick
159 | "Prelude.Parallel.o-n-space.monad-outer-product."
160 `isPrefixOf` benchName = Just SuperQuick
161 | "Prelude.Parallel/o-n-heap.generation." `isPrefixOf` benchName =
163 | "Prelude.Parallel/o-n-heap.mapping." `isPrefixOf` benchName =
165 | "Prelude.Parallel/o-n-heap.concat-foldable." `isPrefixOf` benchName =
167 | "Prelude.Async/o-1-space.monad-outer-product." `isPrefixOf` benchName =
169 | "Prelude.Async/o-n-space.monad-outer-product." `isPrefixOf` benchName =
171 | "Prelude.Ahead/o-1-space.monad-outer-product." `isPrefixOf` benchName =
173 | "Prelude.Ahead/o-n-space.monad-outer-product." `isPrefixOf` benchName =
175 | "Prelude.WAsync/o-n-heap.monad-outer-product." `isPrefixOf` benchName =
177 | "Prelude.WAsync/o-n-space.monad-outer-product." `isPrefixOf` benchName =
179 | "FileSystem.Handle." `isPrefixOf` benchName = Just Quicker
180 | otherwise = Nothing
183main = mainWith targets speedOpts rtsOpts
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list