Diagnostic / Code Fixer idea #69966
Unanswered
TonyValenti
asked this question in
General
Replies: 1 comment
-
It heavily depends on what the key/data type is. In fact for larger types, switch statements should be refactored in to dictionary. Additionally, neither switch statement nor dictionary are performant enough for critical scenarios. A |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've noticed that in performance sensitive situations, dictionaries are often refactored into static switch statements.
It would be nice if there was a diagnostic/code fixer that could detect dictionaries that are never mutated and extract them out into a static switch-expression-based method.
Beta Was this translation helpful? Give feedback.
All reactions