[Patches] [ python-Patches-424475 ] Speed-up tp_compare usage
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 21 May 2001 09:57:52 -0700
Patches item #424475, was updated on 2001-05-16 01:07
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=424475&group_id=5470
Category: core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Speed-up tp_compare usage
Initial Comment:
This patch tries to optimize PyObject_RichCompare for
the common case of objects with equal types which
support tp_compare. It gives a speed-up of roughly 7%
for comparing strings in a loop.
The patch also gives type objects a tp_compare
function, so that they can make use of the improvement.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2001-05-21 09:57
Message:
Logged In: YES
user_id=21627
The revised patch prefers tp_compare over tp_richcompare in
do_cmp if both are available. It also restores
UserList.__cmp__ from deprecation.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=424475&group_id=5470