Original post

The behavior of “if” and “switch” is almost the same.
What I don’t understand is that using an “if” is the same as using a “switch” in terms of performance.
Should I use “if” and “switch” in your opinion, considering many things?