@@ -215,6 +215,11 @@ classifyWith ::
215 (Monad m, Ord k, Num a) => (a -> k) -> SerialT m a -> m (Map k a)
215 (Monad m, Ord k, Num a) => (a -> k) -> SerialT m a -> m (Map k a)
216classifyWith f = S.fold (FL.classifyWith f FL.sum)
216classifyWith f = S.fold (FL.classifyWith f FL.sum)
218+{-# INLINE classifyWithInt #-}
220+ (MonadIO m, Num a) => (a -> Int) -> SerialT m a -> m (IntMap a)
221+classifyWithInt f = S.fold (FL.classifyWith f FL.sum)
218{-# INLINE classifyScanWith #-}
223{-# INLINE classifyScanWith #-}
219classifyScanWith ::
224classifyScanWith ::
220 forall m k a. (Monad m, Ord k, Num a) => (a -> k) -> SerialT m a -> m ()
225 forall m k a. (Monad m, Ord k, Num a) => (a -> k) -> SerialT m a -> m ()
@@ -430,6 +435,8 @@ o_n_heap_serial value =
430 $ demuxWith (getKey 64) mp
435 $ demuxWith (getKey 64) mp
431 , benchIOSink value "classifyWith (64 buckets) sum"
436 , benchIOSink value "classifyWith (64 buckets) sum"
432 $ classifyWith (fst . getKey 64)
437 $ classifyWith (fst . getKey 64)
438+ , benchIOSink value "classifyWithInt (64 buckets) sum"
439+ $ classifyWithInt (fst . getKey 64)
433 , benchIOSink value "classifyScanWith (64 buckets) sum"
440 , benchIOSink value "classifyScanWith (64 buckets) sum"
434 $ classifyScanWith (fst . getKey 64)
441 $ classifyScanWith (fst . getKey 64)
435 , benchIOSink value "classifyMutWith (single bucket) sum"
442 , benchIOSink value "classifyMutWith (single bucket) sum"
@@ -438,14 +445,14 @@ o_n_heap_serial value =
438 $ classifyMutWith (fst . getKey 64)
445 $ classifyMutWith (fst . getKey 64)
439 , benchIOSink value "classifyMutWith (max buckets) sum"
446 , benchIOSink value "classifyMutWith (max buckets) sum"
440 $ classifyMutWith (fst . getKey value)
447 $ classifyMutWith (fst . getKey value)
448+ , benchIOSink value "classifyMutWithInt (64 buckets) sum"
449+ $ classifyMutWithInt (fst . getKey 64)
441 , benchIOSink value "classifyMutWithHash (single bucket) sum"
450 , benchIOSink value "classifyMutWithHash (single bucket) sum"
442 $ classifyMutWithHash (fst . getKey 1)
451 $ classifyMutWithHash (fst . getKey 1)
443 , benchIOSink value "classifyMutWithHash (64 buckets) sum"
452 , benchIOSink value "classifyMutWithHash (64 buckets) sum"
444 $ classifyMutWithHash (fst . getKey 64)
453 $ classifyMutWithHash (fst . getKey 64)
445 , benchIOSink value "classifyMutWithHash (max buckets) sum"
454 , benchIOSink value "classifyMutWithHash (max buckets) sum"
446 $ classifyMutWithHash (fst . getKey value)
455 $ classifyMutWithHash (fst . getKey value)
447− , benchIOSink value "classifyMutWithInt (64 buckets) sum"
448− $ classifyMutWithInt (fst . getKey 64)