Add methods to bypass ConditionalOperation when condition==nothing#4639
Add methods to bypass ConditionalOperation when condition==nothing#4639
ConditionalOperation when condition==nothing#4639Conversation
glwagner
left a comment
There was a problem hiding this comment.
Why does the slow down occur?
|
If necessary we should do this, but I wonder if a better design would simply avoid creating the pointless ConditionalOperation in the first place? |
|
Something is sketchy because the conditional operation should have no effect due to the constant here: |
|
and moreover for example: although I am not sure that method is being hit properly, maybe it isn't. |
|
I think I found one issue. |
|
See #4668 |
|
Closing this since #4795 made this PR obsolete |
Related to #4633
Wrote this short script to time the slowdown we have (compared to directly accessing
interior(u)when usingmean(u)andIntegral(u):On main this produces
On this branch
So this definitely speeds things up (when
ConditionalOperationisn't needed), although there is more work to be done.