selector `_BaseSelectorImpl._key_from_fd` reimplements `.get()` https://github.com/python/cpython/blob/da98ed0aa040791ef08b24befab697038c8c9fd5/Lib/selectors.py#L275 This internal method isn't documented https://docs.python.org/3/library/selectors.html which means it likely can be replaced with `.get()` which would reduce runtime in the select loops current: <img width="574" alt="Screenshot 2023-07-08 at 3 32 38 PM" src="https://github.com/python/cpython/assets/663432/675646f7-3cb6-42b7-900b-854701e374c2"> removed: <img width="575" alt="Screenshot 2023-07-08 at 3 32 34 PM" src="https://github.com/python/cpython/assets/663432/8242318c-1c35-4db0-bdef-9a29500c779c"> <!-- gh-linked-prs --> ### Linked PRs * gh-106555 <!-- /gh-linked-prs -->
Activity
gh-106554: replace `_BaseSelectorImpl._key_from_fd` with `dict.get` (#…