If we care about performance, this should be if () { for (){} } else { for (){} }.