As in https://github.com/python/cpython/issues/146381, frozenset could be optimized in the same way as frozendict. <!-- gh-linked-prs --> ### Linked PRs * gh-148084 * gh-148090 <!-- /gh-linked-prs -->