Don't use streams and fusion
oberblastmeister opened this issue · comments
oberblastmeister commented
The documentation states
Starting from @text-1.3@ fusion is no longer implicit
However, many functions still use Stream
internally, even thought they would probably run a lot faster without it. It is much more efficient to work on the underlying bytes instead of decoding and encoding to and from UTF-32 through Stream
. Some functions that use Stream
include cons
, snoc
, and isPrefix
.
ˌbodʲɪˈɡrʲim commented
I'm in favor. See also #510 (comment) for non-streaming fold
s.
oberblastmeister commented
I think folds should still use Stream
, the issue there is that foldl
should be defined as
foldl = S.foldr (flip f) z . reverseStream