Skip to content

Commit

Permalink
unfoldrN benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
SkamDart committed Feb 9, 2021
1 parent 6969cad commit 33dbbd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bench/BenchAll.hs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ main = do
nf (S.foldl' (\acc x -> acc + fromIntegral x) (0 :: Int)) s) foldInputs
, bgroup "foldr'" $ map (\s -> bench (show $ S.length s) $
nf (S.foldr' (\x acc -> fromIntegral x + acc) (0 :: Int)) s) foldInputs
, bgroup "unfoldrN" $ map (\s -> bench (show $ S.length s) $
nf (S.unfoldrN (S.length s) (\_ -> Nothing) ) s) foldInputs
, bgroup "mapAccumL" $ map (\s -> bench (show $ S.length s) $
nf (S.mapAccumL (\acc x -> (acc + fromIntegral x, succ x)) (0 :: Int)) s) foldInputs
, bgroup "mapAccumR" $ map (\s -> bench (show $ S.length s) $
Expand Down

0 comments on commit 33dbbd5

Please sign in to comment.