What\'s the best practice for using a switch statement vs using an if statement for 30 unsigned enumerations where about 10 have an ex
switch
if
unsigned
while (true) != while (loop)
Probably the first one is optimised by the compiler, that would explain why the second loop is slower when increasing loop count.