3 ms·
Java has bytecode instructions for switches. You're saying the compiler doesn't use them?
by mitxela 2mo ago
Java has bytecode instructions for switches. You're saying the compiler doesn't use them?
- tombert 2mo agoI'm saying that if statements that can be converted to switches usually are converted to switches. Something like: if (x == 5) { doSomething() } else if (x == 6) { doSomethingElse() } This can be trivially converted into a switch and generally is. Run a release build and check me if you'd like.