These two are not equivalent. In fact the second one is slower and potentially dangerous.