Skip to content

Conversation

@Stephen0512
Copy link

This PR improves the implementation of ClientRetryPolicy by replacing list-based membership checks with a set when computing retryable HTTP status codes.

Previously, the retry status code list was generated by checking membership against a list of safe status codes, resulting in repeated O(n) lookups for 999 times. This change introduces a set for the safe status codes, enabling O(1) average-time membership checks while preserving the existing behavior and semantics.

The issue was identified during an ongoing research project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant