def no_perf_degrad(optimzed_time: float, non_optimized_time: float, rtol: float = 5e-2) -> bool:
    """Assert no performance degradation.

    Args:
        optimzed_time (float): [description]
        non_optimized_time (float): [description]
        rtol (float, optional): Max tolerant runtime degradation. Defaults to 5e-3.
    """
    frac_down = max(non_optimized_time, optimzed_time)
    frac_up = min(non_optimized_time, optimzed_time)
    relative_err = 1 - frac_up / frac_down
    return optimzed_time > non_optimized_time and relative_err > rtol