on master help sign in
Add/rearrange INLINE pragmas on benchmarks
commitb77e76fd53411d19823a1348f3f3409bba746267 authorHarendra Kumar <harendra.kumar@gmail.com> dateMon 18 Jun 2018, 02:56 (8 years ago) parent4b05cb4
2 files changed+9−7
benchmark/LinearOps.hs+8−7 src/Streamly/Prelude.hs+1
benchmark/LinearOps.hs+8−7
@@ -24,14 +24,9 @@ maxValue = value + 1000
2424-- Benchmark ops
2525-------------------------------------------------------------------------------
2626
27−{-# INLINE toNull #-}
28−{-# INLINE toList #-}
29−{-# INLINE foldl #-}
30−{-# INLINE last #-}
3127{-# INLINE scan #-}
3228{-# INLINE map #-}
3329{-# INLINE filterEven #-}
34−{-# INLINE mapM #-}
3530{-# INLINE filterAllOut #-}
3631{-# INLINE filterAllIn #-}
3732{-# INLINE takeOne #-}
@@ -41,7 +36,6 @@ maxValue = value + 1000
4136{-# INLINE dropWhileTrue #-}
4237{-# INLINE zip #-}
4338{-# INLINE concat #-}
44−{-# INLINE composeMapM #-}
4539{-# INLINE composeAllInFilters #-}
4640{-# INLINE composeAllOutFilters #-}
4741{-# INLINE composeMapAllInFilter #-}
@@ -52,14 +46,21 @@ scan, map, filterEven, filterAllOut,
5246 :: Monad m
5347 => Stream m Int -> m ()
5448
49+{-# INLINE composeMapM #-}
5550composeMapM :: S.MonadAsync m => Stream m Int -> m ()
51+
52+{-# INLINE toList #-}
5653toList :: Monad m => Stream m Int -> m [Int]
54+{-# INLINE foldl #-}
5755foldl :: Monad m => Stream m Int -> m Int
56+{-# INLINE last #-}
5857last :: Monad m => Stream m Int -> m (Maybe Int)
59−
58+{-# INLINE toNull #-}
6059toNull :: Monad m => (t m Int -> S.SerialT m Int) -> t m Int -> m ()
60+{-# INLINE mapM #-}
6161mapM :: (S.IsStream t, S.MonadAsync m)
6262 => (t m Int -> S.SerialT m Int) -> t m Int -> m ()
63+{-# INLINE zipAsync #-}
6364zipAsync :: S.MonadAsync m => Stream m Int -> m ()
6465
6566-------------------------------------------------------------------------------
src/Streamly/Prelude.hs+1
@@ -830,6 +830,7 @@ sequence m = go (toStream m)
830830-- | Zip two streams serially using a pure zipping function.
831831--
832832-- @since 0.1.0
833+{-# INLINABLE zipWith #-}
833834zipWith :: IsStream t => (a -> b -> c) -> t m a -> t m b -> t m c
834835zipWith f m1 m2 = fromStream $ S.zipWith f (toStream m1) (toStream m2)
835836