5,337
edits
Line 14: | Line 14: | ||
==Switch Statements== | ==Switch Statements== | ||
Technically, switch statements are still branches. | Technically, switch statements are still branches. | ||
However, they can lead to a negligible performance gains if there are lots of cases. | However, they can lead to a negligible performance gains if there are lots of cases. | ||
Only convert if to | Only convert if statements to switch statements when they are significantly more readable in your scenario. | ||
==Polymorphism== | ==Polymorphism== |