Comparison of persistence diagrams