on master help sign in
Fix the zip applicative performance

It got degraded after the previous mkParallel changes.

commitcffe711fac69dfc8fbdb2d3cfa602aca7e67b94e authorHarendra Kumar <harendra.kumar@gmail.com> dateFri 24 Jan 2020, 02:16 (7 years ago) parenta67e688
1 file changed+4−1
src/Streamly/Internal/Data/Stream/Zip.hs+4−1
src/Streamly/Internal/Data/Stream/Zip.hs+4−1
@@ -100,7 +100,10 @@ zipWith f m1 m2 = P.fromStreamS $ S.zipWith f (P.toStreamS m1) (P.toStreamS m2)
100100{-# INLINE zipAsyncWithM #-}
101101zipAsyncWithM :: (IsStream t, MonadAsync m)
102102 => (a -> b -> m c) -> t m a -> t m b -> t m c
103−zipAsyncWithM f m1 m2 = zipWithM f (D.mkParallel m1) (D.mkParallel m2)
103+zipAsyncWithM f m1 m2 = D.fromStreamD $
104+ D.zipWithM f (D.mkParallelD $ D.toStreamD m1)
105+ (D.mkParallelD $ D.toStreamD m2)
106+
104107-- | Like 'zipWith' but zips concurrently i.e. both the streams being zipped
105108-- are generated concurrently.
106109--