further optimizations of tanimoto_vec