[Patches] [ python-Patches-551410 ] xrange() optimization
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 02 May 2002 06:39:38 -0700
Patches item #551410, was opened at 2002-05-02 13:39
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=551410&group_id=5470
Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Raymond Hettinger (rhettinger)
Assigned to: Nobody/Anonymous (nobody)
Summary: xrange() optimization
Initial Comment:
Performance improvement for xrange() when used in
loops or list(xrange()). Does NOT change external
interface or restart characteristics.
Fills the tp_iter and tp_iternext slots to provide
faster looping than access via sq_item wrapped by an
iterobject.
Times about 25% faster than the original. Brings
the performance to within 5 to 7% of range().
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=551410&group_id=5470