mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-09-11 08:25:40 +03:00
Fix fromStreamD performance
Before: not finishing in reasonable time After: 686 us (similar to fromStream)
This commit is contained in:
parent
c8b9fac92b
commit
2c21267a6d
@ -590,7 +590,7 @@ o_1_space_generation size =
|
||||
"generation"
|
||||
[ benchIO "fromStream" $ fromStream size
|
||||
, benchIO "fromStreamK" $ fromStreamK size
|
||||
, benchIO "fromStreamD (n/100)" $ fromStreamD (size `div` 100)
|
||||
, benchIO "fromStreamD" $ fromStreamD size
|
||||
-- Very small benchmarks, reporting in ns
|
||||
-- , benchIO "nilM" $ nilM size
|
||||
, benchIO "consM" $ consM size
|
||||
|
@ -351,7 +351,7 @@ fromStreamD = Unfold step return
|
||||
where
|
||||
|
||||
{-# INLINE_LATE step #-}
|
||||
step (Stream step1 state1) = do
|
||||
step (UnStream step1 state1) = do
|
||||
r <- step1 defState state1
|
||||
return $ case r of
|
||||
Yield x s -> Yield x (Stream step1 s)
|
||||
|
Loading…
Reference in New Issue
Block a user