The performance difference is negligible. The &&
operator won't check the right hand expression when the left hand expression evaluates false
. However, the &
operator will check both regardless, maybe your confusion is caused by this fact.
In this particular example, I'd just choose the one using &&
, since that's better readable.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…