[Patches] [ python-Patches-590843 ] list sort perf boost
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 04 Aug 2002 12:22:19 -0700
Patches item #590843, was opened at 2002-08-04 15:22
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=590843&group_id=5470
Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Tim Peters (tim_one)
Summary: list sort perf boost
Initial Comment:
I don't really love this patch--the names suck. There
are also 2 warnings. The warnings can be removed by
casting, but I wanted to see if anybody had better ideas.
However, I can't let Tim have all the fun optimizing
the hell out of list sort. This patch gets rid of
COMPARE == NULL in the ISLT macro. A structure is
created which holds both the cmp function and
PyObject/Py_LT.
I get a speed up of between ~1-3%. Using the largest
#s, 7.67 -> 7.59 for *sort.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=590843&group_id=5470