All-against-all motif comparing