What is the difference between these two cases? Would the equality check be wrong? If not, which one is faster?