specialize Unit in DenseVector.foreach for better performance