-
Notifications
You must be signed in to change notification settings - Fork 52
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 constant factors of injection into sums. #166
Comments
I spent a while hacking through this on
The result is here if you're looking for inspiration. Presumably you can just chop out the |
@isovector Thank you so much! |
A morning spent hacking on this doesn’t seem to improve performance, unfortunately. The |
@patrickt did you look at the resulting core? Scratch that, I'm not sure why you'd be hitting 16473. But looking at the core would be helpful! |
@isovector I am AFK now but am gonna look at the generated Core soon. My hypothesis either is that the slowness results from passing a dictionary around inside the Union GADT (which we needed to get Carrier instances to typecheck) or that my original assumption was wrong, and that inj/prj is not a meaningful bottleneck. Thank you for your insight on this! |
Removing from the 1.0 milestone. |
Right now we pay a performance penalty when using multiple effects in parallel, even though they fuse correctly, because
inj
(which is called everysend
is O(n) in the number of effects rather than O(1)). A smarterSum
/Union
type could perhaps ameliorate this situation, though we may have to change some code upstream.The text was updated successfully, but these errors were encountered: