Gregory P. Smith <[EMAIL PROTECTED]> added the comment: % ./python.exe -mtimeit 'isinstance(3, int)' 1000000 loops, best of 3: 0.269 usec per loop % ../release25-maint/python.exe -mtimeit 'isinstance(3, int)'1000000 loops, best of 3: 0.335 usec per loop
So I'd say its no longer 4x slower these days. Looking at the Object/abstract.c it appears the fix to this has already been checked in. PyObject_IsInstance already has this in it: /* Quick test for an exact match */ if (Py_TYPE(inst) == (PyTypeObject *)cls) return 1; closing. ---------- nosy: +gregory.p.smith resolution: -> accepted status: open -> closed _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2303> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com