@@ -1154,10 +1154,6 @@ dropWhileFalse value n = composeN n $ S.dropWhile (> (value + 1))
11541154_intervalsOfSum :: MonadAsync m => Double -> Int -> SerialT m Int -> m ()
11551155_intervalsOfSum i n = composeN n (S.intervalsOf i FL.sum)
11561156
1157−-- S.groups
1158−-- S.groupsBy
1159−-- S.groupsByRolling
1160−
11611157{-# INLINE dropByTime #-}
11621158dropByTime :: NanoSecond64 -> Int -> SerialT IO Int -> IO ()
11631159dropByTime i n = composeN n (Internal.dropByTime i)
@@ -1286,6 +1282,46 @@ o_1_space_filteringX4 value =
12861282 ]
12871283 ]
12881284
1285+-------------------------------------------------------------------------------
1286+-- Grouping transformations
1287+-------------------------------------------------------------------------------
1288+
1289+{-# INLINE groups #-}
1290+groups :: MonadIO m => SerialT m Int -> m ()
1291+groups = S.drain . S.groups FL.drain
1292+
1293+-- XXX Change this test when the order of comparison is later changed
1294+{-# INLINE groupsByGT #-}
1295+groupsByGT :: MonadIO m => SerialT m Int -> m ()
1296+groupsByGT = S.drain . S.groupsBy (>) FL.drain
1297+
1298+{-# INLINE groupsByEq #-}
1299+groupsByEq :: MonadIO m => SerialT m Int -> m ()
1300+groupsByEq = S.drain . S.groupsBy (>) FL.drain
1301+
1302+-- XXX Change this test when the order of comparison is later changed
1303+{-# INLINE groupsByRollingLT #-}
1304+groupsByRollingLT :: MonadIO m => SerialT m Int -> m ()
1305+groupsByRollingLT =
1306+ S.drain . S.groupsByRolling (<) FL.drain
1307+
1308+{-# INLINE groupsByRollingEq #-}
1309+groupsByRollingEq :: MonadIO m => SerialT m Int -> m ()
1310+groupsByRollingEq =
1311+ S.drain . S.groupsByRolling (>) FL.drain
1312+
1313+o_1_space_grouping :: Int -> [Benchmark]
1314+o_1_space_grouping value =
1315+ -- Buffering operations using heap proportional to group/window sizes.
1316+ [ bgroup "grouping"
1317+ [ benchIOSink value "groups" groups
1318+ , benchIOSink value "groupsByGT" groupsByGT
1319+ , benchIOSink value "groupsByEq" groupsByEq
1320+ , benchIOSink value "groupsByRollingLT" groupsByRollingLT
1321+ , benchIOSink value "groupsByRollingEq" groupsByRollingEq
1322+ ]
1323+ ]
1324+
12891325-------------------------------------------------------------------------------
12901326-- Size increasing transformations (insertions)
12911327-------------------------------------------------------------------------------