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
{{ message }}
Repository navigation
UnrechableBlocksOptimizer has bad performance #90717
I randomly paused the debugger while running the linker, and it was on this line. This is also where it spends most of its time per the performance trace.
Here, FoldedInstructions has 22542 elements. So a dictionary should be a lot better than linear search.
One more note that a dictionary could even be avoided. The instruction index is only calculated to check whether it's in a specific range, and this range is always VERY small. We could just loop through this small range. Note that this small range is either single instruction, two instructions, or maximum three instructions (IsJumpTargetRange (i - 2, i)).
Activity
Youssef1313 commentedon Aug 17, 2023
I randomly paused the debugger while running the linker, and it was on this line. This is also where it spends most of its time per the performance trace.
Here, FoldedInstructions has 22542 elements. So a dictionary should be a lot better than linear search.
One more note that a dictionary could even be avoided. The instruction index is only calculated to check whether it's in a specific range, and this range is always VERY small. We could just loop through this small range. Note that this small range is either single instruction, two instructions, or maximum three instructions (
IsJumpTargetRange (i - 2, i)).Youssef1313 commentedon Aug 17, 2023
@vitek-karas @sbomer Can you please take a look at this? This should hopefully improve the performance a lot