on master help sign in
Add/rearrange INLINE pragmas on benchmarks
b77e76fHarendra Kumar
benchmark/LinearOps.hs+8−7
@@ -24,14 +24,9 @@ maxValue = value + 1000
24-- Benchmark ops
24-- Benchmark ops
25-------------------------------------------------------------------------------
25-------------------------------------------------------------------------------
26
26
27−{-# INLINE toNull #-}
28−{-# INLINE toList #-}
29−{-# INLINE foldl #-}
30−{-# INLINE last #-}
31{-# INLINE scan #-}
27{-# INLINE scan #-}
32{-# INLINE map #-}
28{-# INLINE map #-}
33{-# INLINE filterEven #-}
29{-# INLINE filterEven #-}
34−{-# INLINE mapM #-}
35{-# INLINE filterAllOut #-}
30{-# INLINE filterAllOut #-}
36{-# INLINE filterAllIn #-}
31{-# INLINE filterAllIn #-}
37{-# INLINE takeOne #-}
32{-# INLINE takeOne #-}
@@ -41,7 +36,6 @@ maxValue = value + 1000
41{-# INLINE dropWhileTrue #-}
36{-# INLINE dropWhileTrue #-}
42{-# INLINE zip #-}
37{-# INLINE zip #-}
43{-# INLINE concat #-}
38{-# INLINE concat #-}
44−{-# INLINE composeMapM #-}
45{-# INLINE composeAllInFilters #-}
39{-# INLINE composeAllInFilters #-}
46{-# INLINE composeAllOutFilters #-}
40{-# INLINE composeAllOutFilters #-}
47{-# INLINE composeMapAllInFilter #-}
41{-# INLINE composeMapAllInFilter #-}
@@ -52,14 +46,21 @@ scan, map, filterEven, filterAllOut,
52 :: Monad m
46 :: Monad m
53 => Stream m Int -> m ()
47 => Stream m Int -> m ()
54
48
49+{-# INLINE composeMapM #-}
55composeMapM :: S.MonadAsync m => Stream m Int -> m ()
50composeMapM :: S.MonadAsync m => Stream m Int -> m ()
51+
52+{-# INLINE toList #-}
56toList :: Monad m => Stream m Int -> m [Int]
53toList :: Monad m => Stream m Int -> m [Int]
54+{-# INLINE foldl #-}
57foldl :: Monad m => Stream m Int -> m Int
55foldl :: Monad m => Stream m Int -> m Int
56+{-# INLINE last #-}
58last :: Monad m => Stream m Int -> m (Maybe Int)
57last :: Monad m => Stream m Int -> m (Maybe Int)
59−
58+{-# INLINE toNull #-}
60toNull :: Monad m => (t m Int -> S.SerialT m Int) -> t m Int -> m ()
59toNull :: Monad m => (t m Int -> S.SerialT m Int) -> t m Int -> m ()
60+{-# INLINE mapM #-}
61mapM :: (S.IsStream t, S.MonadAsync m)
61mapM :: (S.IsStream t, S.MonadAsync m)
62 => (t m Int -> S.SerialT m Int) -> t m Int -> m ()
62 => (t m Int -> S.SerialT m Int) -> t m Int -> m ()
63+{-# INLINE zipAsync #-}
63zipAsync :: S.MonadAsync m => Stream m Int -> m ()
64zipAsync :: S.MonadAsync m => Stream m Int -> m ()
64
65
65-------------------------------------------------------------------------------
66-------------------------------------------------------------------------------
src/Streamly/Prelude.hs+1
@@ -830,6 +830,7 @@ sequence m = go (toStream m)
830-- | Zip two streams serially using a pure zipping function.
830-- | Zip two streams serially using a pure zipping function.
831--
831--
832-- @since 0.1.0
832-- @since 0.1.0
833+{-# INLINABLE zipWith #-}
833zipWith :: IsStream t => (a -> b -> c) -> t m a -> t m b -> t m c
834zipWith :: IsStream t => (a -> b -> c) -> t m a -> t m b -> t m c
834zipWith f m1 m2 = fromStream $ S.zipWith f (toStream m1) (toStream m2)
835zipWith f m1 m2 = fromStream $ S.zipWith f (toStream m1) (toStream m2)
835
836