Message289474
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 <report@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 <report@bugs.python.org>
> <http://bugs.python.org/issue28685>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2017-03-12 04:46:08 | elliot.gorokhovsky | set | recipients:
+ elliot.gorokhovsky, tim.peters, vstinner, serhiy.storchaka, eryksun, ppperry, mdk |
2017-03-12 04:46:08 | elliot.gorokhovsky | link | issue28685 messages |
2017-03-12 04:46:07 | elliot.gorokhovsky | create | |
|