下面哪一个代码的执行速度更快?

Which one of the following codes is faster in excecution?

基本上哪一个代码会 return 0,更快?

// 如果答案是 "the same",因为代码比想象中的更复杂的代码变体更简单,以相同的方式编写但代码更多。

代码 1:

int a = 0;

if(a == 1){ 
    return 1;
}else{
    return 0;
}

代码 2:

int a = 0;

if(a == 1){ 
    return 1;
}
return 0;

编译器生成的代码不会有任何区别。 else 是不必要的,但为了清楚起见可以写成。