Consider using range-checking for contiguous subsets of switches leading to the same label. #14878
Labels
Area-Compilers
Concept-Design Debt
Engineering Debt, Design Debt, or poor product code quality
Language-C#
Milestone
Related to https://github.com/dotnet/coreclr/issues/7914
Becasue of cascaded dispatching into "try" regions , it is not uncommon to see async state machine to contain degenerate switches like
Similar code might happen when code is produced via a generator or even written by hand.
We could detect subranges of a switch bucket leading to the same label and at some threshold ( 4 or 5? ), split them off into separate buckets that only need to do a range check.
The text was updated successfully, but these errors were encountered: