cpython/Misc
Andrew MacIntyre d57caed52c Performance of list([]) in 2.3 came up in a thread on comp.lang.python,
which can be reviewed via
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2003-12/1011.html

Duncan Booth investigated, and discovered that an "optimisation" was
in fact a pessimisation for small numbers of elements in a source list,
compared to not having the optimisation, although with large numbers
of elements in the source list the optimisation was quite beneficial.

He posted his change to comp.lang.python (but not to SF).

Further research has confirmed his assessment that the optimisation only
becomes a net win when the source list has more than 100 elements.

I also found that the optimisation could apply to tuples as well,
but the gains only arrive with source tuples larger than about 320
elements and are nowhere near as significant as the gains with lists,
(~95% gain @ 10000 elements for lists, ~20% gain @ 10000 elements for
tuples) so I haven't proceeded with this.

The code as it was applied the optimisation to list subclasses as
well, and this also appears to be a net loss for all reasonable sized
sources (~80-100% for up to 100 elements, ~20% for more than 500
elements; I tested up to 10000 elements).

Duncan also suggested special casing empty lists, which I've extended
to all empty sequences.

On the basis that list_fill() is only ever called with a list for the
result argument, testing for the source being the destination has
now happens before testing source types.
2003-12-25 13:28:48 +00:00
..
RPM Patch #823259: Update spec file: 2003-10-19 18:34:52 +00:00
ACKS Performance of list([]) in 2.3 came up in a thread on comp.lang.python, 2003-12-25 13:28:48 +00:00
AIX-NOTES The fix to use . was incorporated 2003-06-08 02:25:17 +00:00
BeOS-NOTES Completely revamped BeOS notes, by Donn Cave (SF patch 411834). 2001-04-10 21:51:29 +00:00
BeOS-setup.py SF patch 568629 by Oren Tirosh: types made callable. 2002-06-14 20:41:17 +00:00
HISTORY Fix a bunch of typos in documentation, docstrings and comments. 2003-10-20 14:01:56 +00:00
NEWS Performance of list([]) in 2.3 came up in a thread on comp.lang.python, 2003-12-25 13:28:48 +00:00
NEWS.help Updated (2.3 OK now) 2003-01-03 03:29:58 +00:00
PURIFY.README Updated for Python 1.5, including my experiences with Purify on 1997-10-07 15:50:58 +00:00
Porting Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
README mention pymemcompat.h in Misc/README 2003-08-11 16:18:43 +00:00
RFD Initial revision 1994-01-26 10:20:16 +00:00
SpecialBuilds.txt _Py_PrintReferenceAddresses(): also print the type name. In real use 2003-04-18 00:45:59 +00:00
cheatsheet Update for new module and new builtin. 2003-07-12 23:55:57 +00:00
find_recursionlimit.py script that reports a fairly safe recursionlimit for a specific platform 2000-08-31 19:24:17 +00:00
gdbinit A helper to dump info about the current frame, 2003-10-03 20:56:15 +00:00
indent.pro Some new files... 1994-09-14 14:06:46 +00:00
pymemcompat.h Fix grammatically inept comment. 2002-08-22 13:36:11 +00:00
python-mode.el Sync with python-mode project. Adds two changes: 2003-12-18 21:53:33 +00:00
python.man Remove -U from argument list. 2003-05-26 05:15:35 +00:00
setuid-prog.c correct bogus instructions 'ccoment out' -> 'uncomment' 1998-09-10 20:18:09 +00:00
vgrindefs Add 'yield' as a keyword 2001-08-06 17:42:53 +00:00

README

Python Misc subdirectory
========================

This directory contains files that wouldn't fit in elsewhere.  Some
documents are only of historic importance.

Files found here
----------------

ACKS		Acknowledgements
AIX-NOTES	Notes for building Python on AIX
BeOS-NOTES	Notes for building on BeOS
BeOS-setup.py	setup.py replacement for BeOS, see BeOS-NOTES
cheatsheet	Quick summary of Python by Ken Manheimer
find_recursionlimit.py  Script to find a value for sys.maxrecursionlimit
gdbinit		Handy stuff to put in your .gdbinit file, if you use gdb
HISTORY		News from previous releases -- oldest last
HPUX-NOTES	Notes about dynamic loading under HP-UX
indent.pro	GNU indent profile approximating my C style
NEWS		News for this release (for some meaning of "this")
Porting		Mini-FAQ on porting to new platforms
PURIFY.README	Information for Purify users
pymemcompat.h	Memory interface compatibility file.
python.man	UNIX man page for the python interpreter
python-mode.el	Emacs mode for editing Python programs
README		The file you're reading now
RFD		Request For Discussion about a Python newsgroup
RPM		(Old) tools to build RPMs
SpecialBuilds.txt     Describes extra symbols you can set for debug builds
setuid-prog.c	C helper program for set-uid Python scripts
vgrindefs	Python configuration for vgrind (a generic pretty printer)