Efficient Algorithm to Find Performance Measures in Systems under Structural Perturbations