cpython/Objects
Raymond Hettinger 90a39bf12c Refactor list_extend() and list_fill() for gains in code size, memory
utilization, and speed:

* Moved the responsibility for emptying the previous list from list_fill
  to list_init.

* Replaced the code in list_extend with the superior code from list_fill.

* Eliminated list_fill.

Results:

* list.extend() no longer creates an intermediate tuple except to handle
  the special case of x.extend(x).  The saves memory and time.

* list.extend(x) runs
    5 to 10% faster when x is a list or tuple
    15% faster when x is an iterable not defining __len__
    twice as fast when x is an iterable defining __len__

* the code is about 15 lines shorter and no longer duplicates
  functionality.
2004-02-15 03:57:00 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c SF Patch #871704: Py_SequenceFast can mask errors 2004-01-11 23:26:51 +00:00
boolobject.c - bool() called without arguments now returns False rather than 2003-04-19 18:15:10 +00:00
bufferobject.c Call me anal, but there was a particular phrase that was speading to 2002-08-19 19:26:42 +00:00
cellobject.c Use new GC API. 2001-08-29 23:54:21 +00:00
classobject.c - When method objects have an attribute that can be satisfied either 2003-11-22 23:55:50 +00:00
cobject.c Make CObjects mutable. Fixes #477441. 2003-10-19 18:30:01 +00:00
complexobject.c Simplify and speedup uses of Py_BuildValue(): 2003-10-12 19:09:37 +00:00
descrobject.c Use PyDict_Contains() instead of PySequence_Contains(). 2003-12-13 11:58:56 +00:00
dictnotes.txt Add notes on use cases with paired accesses to the same key. 2003-05-28 14:10:46 +00:00
dictobject.c Simplify previous checkin -- a new function was not needed. 2003-12-13 13:31:55 +00:00
enumobject.c Make reversed() transparent with respect to length. 2004-02-10 09:33:39 +00:00
fileobject.c Remove support for --without-universal-newlines (see PEP 11). 2004-02-07 13:53:46 +00:00
floatobject.c Remove support for SunOS 4. 2004-01-17 14:19:44 +00:00
frameobject.c Two forgotten Py_DECREF() for two out-of-memory conditions. 2004-01-27 16:08:07 +00:00
funcobject.c SF bug #753451: classmethod abuse --> SystemError 2003-06-18 01:13:41 +00:00
intobject.c SF patch #875689: >100k alloc wasted on startup 2004-02-08 18:54:37 +00:00
iterobject.c Whitespace normalization. 2003-06-25 13:12:18 +00:00
listobject.c Refactor list_extend() and list_fill() for gains in code size, memory 2004-02-15 03:57:00 +00:00
listsort.txt Fixed new typos, added a little info about ~sort versus "hint"s. 2002-08-10 07:04:01 +00:00
longobject.c SF patch 703666: Several objects don't decref tmp on failure in subtype_new 2003-06-28 20:04:25 +00:00
methodobject.c * Added a new method flag, METH_COEXIST. 2003-12-13 11:26:12 +00:00
moduleobject.c Remove code that tried to warn about shadowing builtin names after a 2003-07-16 22:04:11 +00:00
object.c Removed two unneeded lines from PyObject_Compare(). 2004-01-27 20:17:54 +00:00
obmalloc.c Whitespace normalization. 2003-06-17 15:48:11 +00:00
rangeobject.c Implement and apply PEP 322, reverse iteration 2003-11-06 14:06:48 +00:00
setobject.c * Simplify and speedup logic for tp_print. 2003-12-31 14:08:58 +00:00
sliceobject.c SF bug #800796: Difference between hash() and __hash__() 2003-09-05 14:27:30 +00:00
stringobject.c [SF #866875] Add a specialized routine for one character 2004-01-05 00:29:51 +00:00
structseq.c Removed all uses of the out-of-favor __safe_for_unpickling__ magic 2003-02-01 02:16:37 +00:00
tupleobject.c Extended tuple's C API to include a new function, PyTuple_Pack() that is 2003-10-12 18:24:34 +00:00
typeobject.c Fixed a bug in object.__reduce_ex__ (reduce_2) when using protocol 2004-02-08 04:21:26 +00:00
unicodectype.c Fix gcc 3.3 warnings related to Py_UNICODE_WIDE. 2003-12-29 01:36:01 +00:00
unicodeobject.c Fix reallocation bug in unicode.translate(): The code was comparing 2004-02-05 17:36:00 +00:00
unicodetype_db.h Add unidata_version. Bump generator version number. 2002-11-25 09:13:37 +00:00
weakrefobject.c Allocating a new weakref object can cause existing weakref objects for 2004-02-04 23:14:14 +00:00