ifステートメントに従うことの複雑さを疑問に思っています
if (isTrue()) //case 1
VS
if(isTrue()==true) //case 2
そしてisTrueは次のように定義されます
boolean isTrue(){
//lots of calculation and return true false based on that.
return output;
}
私が考えていたのは、ケース2ではequalsの追加の比較が必要なため、の複雑さif (isTrue())
はそれよりも低いということです。if(isTrue()==true)
スペースの複雑さはどうですか?
別の考えはありますか?