3 ms·
I totally agree that the use of all those ifs is bad. That said a switch statement will be faster than the code you posted(Though you were thinking in another
by sanswork 19y ago
I totally agree that the use of all those ifs is bad. That said a switch statement will be faster than the code you posted(Though you were thinking in another language when your wrote your snippit methinks) if speed is your concern.