-
Notifications
You must be signed in to change notification settings - Fork 252
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
Improve Stream efficency #191
Comments
https://www.cs.ox.ac.uk/ralf.hinze/publications/IFL10.pdf looks like a good read on the subject. |
Does anyone have a good benchmark for Streams? |
A easy first step to improve perf would be to implement this change: scalaz/scalaz#1104 |
food for thought: http://jyp.github.io/posts/controlled-fusion.html |
initial experiment show good results based on Mu/Nu lists from above. If no objection I will try to put something together. @clinuxrulz did you work on a design for stream fusion? |
No. I've been too busy at work unfortunately. I have nothing to contribute, you go ahead with your implementation. |
I haven't worked out how to do stream fusion in Java yet. However I've got an implementation based on a stackless Coroutine with re-associated binds that emits values. which is more or less like this in haskell
Heres the code: https://github.com/clinuxrulz/functionaljava/blob/stream/core/src/main/java/fj/data/Stream2.java I just need benchmarks to see if I've helped or hindered the situation. |
I think quite some work was done in RxJava2 on operator fusion, it might be interesting to whoever takes on this issue. |
Stream is rather slow, we should probably switch to an implementation based on a fold algebra with fusion whenever possible.
The text was updated successfully, but these errors were encountered: