Is it better to have if / else if, if every block in the if statement returns, or is it better to have a chain of ifs? To be specific, which if fastest:
A:
if (condition1) {
code1;
return a;
}
if (condition2) {
code2;
return b;
}
//etc...
B:
if (condition1) {
code1;
return a;
}
else if (condition2) {
code2;
return b;
}
//etc...
It makes no difference, and this is a needless attempt at micro-optimization.