Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

For reference, caching was introduced in 
b1aa19515ffdb84c6633ee0344196fd8bd50ade0 21 years ago, and initially it checked 
for pre-compiled patterns before looking up in the cache. But it was changed 2 
months later in 7898c3e6852565046a9b8b063d35d66777bf5176 and since then the 
cache was checked first. There was no explicit note about this in commit 
message, but I think that it was done to speed up the common case.

There were many changes in the caching mechanism, but this part of logic was 
left unchanged. Maybe if once we implement fast dispatch by the type of the 
first argument we reconsider this code.

----------
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45462>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to