Improve performance of remove-parallel-edges