-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is vector
susceptible to the same fusion problems as text
?
#457
Comments
My opinion is a big NO!
This issue provides
Maybe you don't, but many people depend on it, often even without realizing it. I've personally written code that relies on the fact that operations fuse together. Removing fusion is totally out of the question in For those who need flat vectors without any fusion they can use In any case, If there is indeed the need for vectors without fusion, which sounds sensible to me, I would rather recommend writing another library that provides the same drop-in interface as vector, but without fusion. In fact all of the type classes defined in vector could be reused, but the types would have to be redefined because instances would be different Again if there is indeed need for this (a discussion on mailing list or CLC proposal?) and someone is willing to do the work we could solve this by creating:
This is the most reasonable solution I can think of because:
|
Thanks for your long explanation. Having a |
Is fusion in
vector
susceptible to the issues described in haskell/text#348? If so, should we think about disabling implicit fusion forvector
as well?The PR says that fusion is more useful for libraries like
vector
for long chains of transformations. However, I, at least, wouldn't write long chains of transformations with vectors either, because I don't want to rely on fusion rules, that may or may not fire (and may even make performance worse!), for performance. I'd rather explicitly use streaming or use mutable vectors for the intermediate transformations.If I understand correctly, disabling implicit fusion would also improve compile times. Although the way
vector
seems to be designed, it might be hard (to the point of not being feasible) to decouple it from the fusion framework.The text was updated successfully, but these errors were encountered: