added benchmark with calculating distance matrix