[Python-checkins] python/dist/src/Objects tupleobject.c,2.72,2.73
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Thu, 05 Sep 2002 13:18:10 -0700
- Previous message: [Python-checkins] python/nondist/sandbox/spambayes GBayes.py,1.15,NONE Tester.py,1.3,NONE classifier.py,1.11,NONE cleanarch,1.2,NONE mboxcount.py,1.5,NONE rebal.py,1.3,NONE setup.py,1.1,NONE split.py,1.5,NONE splitn.py,1.2,NONE timtest.py,1.17,NONE
- Next message: [Python-checkins] python/dist/src/Lib user.py,1.6,1.7 posixpath.py,1.51,1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv25563
Modified Files:
tupleobject.c
Log Message:
Micro-optimization for list_contains. Factored double if test
out of the loop.
Index: tupleobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v
retrieving revision 2.72
retrieving revision 2.73
diff -C2 -d -r2.72 -r2.73
*** tupleobject.c 19 Aug 2002 19:26:42 -0000 2.72
--- tupleobject.c 5 Sep 2002 20:18:08 -0000 2.73
***************
*** 264,275 ****
int i, cmp;
! for (i = 0; i < a->ob_size; ++i) {
cmp = PyObject_RichCompareBool(el, PyTuple_GET_ITEM(a, i),
! Py_EQ);
! if (cmp > 0)
! return 1;
! else if (cmp < 0)
! return -1;
! }
return 0;
}
--- 264,274 ----
int i, cmp;
! for (i = 0, cmp = 0 ; cmp == 0 && i < a->ob_size; ++i)
cmp = PyObject_RichCompareBool(el, PyTuple_GET_ITEM(a, i),
! Py_EQ);
! if (cmp > 0)
! return 1;
! if (cmp < 0)
! return -1;
return 0;
}
- Previous message: [Python-checkins] python/nondist/sandbox/spambayes GBayes.py,1.15,NONE Tester.py,1.3,NONE classifier.py,1.11,NONE cleanarch,1.2,NONE mboxcount.py,1.5,NONE rebal.py,1.3,NONE setup.py,1.1,NONE split.py,1.5,NONE splitn.py,1.2,NONE timtest.py,1.17,NONE
- Next message: [Python-checkins] python/dist/src/Lib user.py,1.6,1.7 posixpath.py,1.51,1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]