faster comparison of double vectors