Raymond Hettinger added the comment: Rather than see statistics, I'm curious about what circumstances where the optimization would kick in. Interned strings are pre-hashed but they already benefit from an identity-implies-equality check. Dicts and sets already incorporate a check-hash-before-equality check.
That raises the question of what strings ever have had their hash already computed if the string hasn't been interned or has been used in a dict or set? P.S. I rather like the optimization and don't want to discourage it. I'm just curious about what the current optimizations are missing. ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com