Posts: 178
Threads: 5
Joined: Aug 2016
Reputation:
0
Ok so I know switch is faster than if but is there something faster than switch?
Posts: 775
Threads: 78
Joined: Dec 2014
Why would there?
No, switch are fastest and uses less cpu.
Posts: 694
Threads: 2
Joined: Oct 2012
Reputation:
0
Switch is not "faster", it works different, it works with constants, while with if-else if you can check if two variables are same.
Learn how to use each the right way, and you don't need your code to be "faster" at all, everything would just work.