What is faster?
#1

Ok so I know switch is faster than if but is there something faster than switch?
Reply
#2

Why would there?
No, switch are fastest and uses less cpu.
Reply
#3

Ok thx
Reply
#4

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.
Reply
#5

Quote:
Originally Posted by Meller
Посмотреть сообщение
Why would there?
No, switch are fastest and uses less cpu.
Please learn when to use is and when to use are (as you don't listen to criticism and just get angry).

is = singular
are = plural

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
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.
That's right, they execute in milliseconds either way.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)