Java: Performance of Enums vs. if-then-else
-
30-10-2019 - |
Question
I've had no real luck getting a concise answer for this comparison by using Google and rather than do my own time consuming evaluations, I thought I would ask first.
I'm fairly sure that a switch statement using Enums would perform faster than an if-then-else statement, though whether or not it is a noticable difference is another question.
Could someone shed some light on this for me?
Thanks for the quick responses guys, I will keep this in mind for future projects.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow