-
Notifications
You must be signed in to change notification settings - Fork 535
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
Parallel map2 optimization #3428
Conversation
Benchmark results:
So yeah, the old (and simplest) implementation (with I propose going back to the old implementation. |
First off, this is a clever and subtle bit of fiber ordering. :-) The supervisor fibers weren't meant to remove the tuple, but rather meant to remove the Regarding the tuple-vs-not-tuple, we might want to hold off on that until we adjust Finally, |
Yeah, it was a nice puzzle to figure out :-) Avoiding Optimizing |
Also the
I'm going to just knock off the |
Since you are so keen on it, I can look at it too :) is the idea basically to revive this PR typelevel/cats#3993? |
No, simpler than that. Just dynamically typecase on the Should be accompanied by some benchmarks to demonstrate that it's worth it. We can benchmark on |
I think we shouldn't hold this PR for the |
Okay. Should this be merged as is, or should I add a commit to go back to the old implementation (with |
Sorry forgot to reply. Let's just go back to the old implementation. I suspect we can still do better, but for now, let's do that. |
Context:
The "old" parallel
map2
usedboth
; #2159 optimized it to avoid tuples, but that implementation was incorrect; #2239 fixed it by starting 2 extra fibers.What is this:
both
(as allocating a few tuples might be cheaper than starting 2 extra fibers).