Elliot Gorokhovsky added the comment: Ya, that makes sense... I just don't get why it's faster at all, then! Because if we add the (v==w) check, and the tp_richcompare check, how is unsafe_object_compare any different from PyObject_RichComareBool? Is it that we're saving function calls? (PyObject_RichCompareBool calls do_richcompare, so it's one extra call IIRC).
On Sat, Mar 11, 2017 at 9:32 PM Tim Peters <rep...@bugs.python.org> wrote: > > Tim Peters added the comment: > > The impact would be small: it would add one (or so) pointer-equality > compare that, in practice, will always say "yup, they're equal". Dirt > cheap, and the branch is 100% predictable. > > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue28685> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28685> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com