Replace _face_distance with more efficient calculation (#19)
From http://stackoverflow.com/questions/7741878/how-to-apply-numpy-linalg-norm-to-each-row-of-a-matrix Running time comparisons (prev vs. new, performed using faces = np.random.rand(n, 128), face_to_compare = np.random.rand(1, 128)) n = 1M: 5.3s vs. 1.1s n = 5M: 26.9s vs. 6.6s n = 10M: 52.6s vs. 23s
Showing
想要评论请 注册 或 登录