talking about java performance .. what is better? if..else or multiple simple if
if( condition ) {
some_code;
return value;
}
else if( condition ) {
so
I would not worry about performance here as much as code readability and maintainability. As was mentioned, the performance will be essentially identical after the code is compiled.
It is my preference to be more explicit about my conditions, instead of allowing behavior to implicitly "fall through".
Also, the single if will not be evaluated any faster than the if else. The else path will never be checked if the case is true.