-
Notifications
You must be signed in to change notification settings - Fork 23
Buffering #24
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
base: master
Are you sure you want to change the base?
Buffering #24
Conversation
a15f6de
to
0394965
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite nice!
eaf6598
to
a70ff96
Compare
I'd actually prefer to do things a little differently with all the buffering functions. In particular, I think that |
@simonmar, for the sake of consistency with the rest of the module, I don't think the poorly named |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this kind of change I think it's pretty important to get some benchmarks to demonstrate that at the least it doesn't cause any regressions. We have nofib/parallel
, and you'll need a machine with at least 8 cores.
I'm OK with adding things to the API, but we should be careful about breaking changes because this API is used in my book.
It does not pass with the current implementation of `rparWith`.
* Lift the result to avoid always reducing to WHNF. * Rewrite the documentation of `rparWith`. Fixes haskell#35
* Add `buffering` to buffer compositionally. * Redefine `parBuffer` in terms of `buffering`. * Manually deforest `evalBuffer`. * Add more rules for `evalBuffer`.
Don't try to change lots of `RULES` and inlining in this PR; keep it more confined.
@simonmar, I've made the changes much more conservative, which I'm hoping will make it easier to merge. In particular, I have ideas about reworking the way we deal with
|
Hi @treeowl - I'm inclined to be very conservative with merging further changes to this package, given that we've all become confused at one time or another about how things are supposed to work. So let me propose that before merging any further PRs, especially unforced ones, we should
|
I think we should replace @treeowl would you mind updating the PR? Otherwise, I can take over. |
I can try to page it back in; it's been a while since I wrote this. |
Add
buffering
to buffer compositionally.Manually deforest
evalBuffer
andparBuffer
.Add more rules for
evalBuffer
andparBuffer
.This PR is layered on another; I could disentangle them if necessary.
Closes #23