You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g. 1. You are in a loop which does a side effect but hits out of bounds. We know before the exception there are these side affects plus the exception which is a side effect. Eliminate bound checking upto the point the exception is thrown by breaking the loop into 2 ranges. If any side of the effects are not observable from outside either by memory mutation, exception or reflection, just eliminate the whole part of code.
E.g. 2. If a loop prints 1 to 100, instead of multiple IO operations, in absence of any other possibilities. Fuse all the IO operations into 1 operation.
E.g. 3. If we initialise multiple array elements certain value, just initialise memory than doing this.
Simply put it, if something to not externally observable, no need to do it. If what is observed can be inferred statically or during JIT do it, Boundary can be Assembly or Application depending on context.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Can you can add side effect
This will have to deal with:
E.g. 1. You are in a loop which does a side effect but hits out of bounds. We know before the exception there are these side affects plus the exception which is a side effect. Eliminate bound checking upto the point the exception is thrown by breaking the loop into 2 ranges. If any side of the effects are not observable from outside either by memory mutation, exception or reflection, just eliminate the whole part of code.
E.g. 2. If a loop prints 1 to 100, instead of multiple IO operations, in absence of any other possibilities. Fuse all the IO operations into 1 operation.
E.g. 3. If we initialise multiple array elements certain value, just initialise memory than doing this.
Simply put it, if something to not externally observable, no need to do it. If what is observed can be inferred statically or during JIT do it, Boundary can be Assembly or Application depending on context.
Beta Was this translation helpful? Give feedback.
All reactions