summaryrefslogtreecommitdiffstats
path: root/Lib/copy.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-03-08 05:56:15 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-03-08 05:56:15 (GMT)
commit99842b65347b33af37d708b77c7d789909bacf9c (patch)
tree5c53edd64c563cd1f8f8f037e9a54d0d8199d98c /Lib/copy.py
parentebedb2f773508ec50df1130bdd53b150a9fab84c (diff)
downloadcpython-99842b65347b33af37d708b77c7d789909bacf9c.zip
cpython-99842b65347b33af37d708b77c7d789909bacf9c.tar.gz
cpython-99842b65347b33af37d708b77c7d789909bacf9c.tar.bz2
Small optimizations for list_slice() and list_extend_internal().
* Using addition instead of substraction on array indices allows the compiler to use a fast addressing mode. Saves about 10%. * Using PyTuple_GET_ITEM and PyList_SET_ITEM is about 7% faster than PySequenceFast_GET_ITEM which has to make a list check on every pass.
Diffstat (limited to 'Lib/copy.py')
0 files changed, 0 insertions, 0 deletions