Skip to content

Commit 56331cd

Browse files
konsumlammtreeowl
authored andcommitted
Use S.replicate in sequence-benchmarks
1 parent 14c8366 commit 56331cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

containers-tests/benchmarks/Sequence.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ main = do
126126
nf (\s -> ((+) <$> s <*> s) `S.index` (S.length s * S.length s `div` 2))
127127
(S.fromFunction (floor (sqrt $ fromIntegral (maxBound::Int))-10) (+1))
128128
, bench "nf100/2500/rep" $
129-
nf (\(s,t) -> (,) <$> replicate s () <*> replicate t ()) (100,2500)
129+
nf (\(s,t) -> (,) <$> S.replicate s () <*> S.replicate t ()) (100,2500)
130130
, bench "nf100/2500/ff" $
131131
nf (\(s,t) -> (,) <$> S.fromFunction s (+1) <*> S.fromFunction t (*2)) (100,2500)
132132
, bench "nf500/500/rep" $
133-
nf (\(s,t) -> (,) <$> replicate s () <*> replicate t ()) (500,500)
133+
nf (\(s,t) -> (,) <$> S.replicate s () <*> S.replicate t ()) (500,500)
134134
, bench "nf500/500/ff" $
135135
nf (\(s,t) -> (,) <$> S.fromFunction s (+1) <*> S.fromFunction t (*2)) (500,500)
136136
, bench "nf2500/100/rep" $
137-
nf (\(s,t) -> (,) <$> replicate s () <*> replicate t ()) (2500,100)
137+
nf (\(s,t) -> (,) <$> S.replicate s () <*> S.replicate t ()) (2500,100)
138138
, bench "nf2500/100/ff" $
139139
nf (\(s,t) -> (,) <$> S.fromFunction s (+1) <*> S.fromFunction t (*2)) (2500,100)
140140
]

0 commit comments

Comments
 (0)