]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Optimizations for bytes reallocation.
authorGuido van Rossum <guido@python.org>
Fri, 5 May 2006 04:34:18 +0000 (04:34 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 5 May 2006 04:34:18 +0000 (04:34 +0000)
commita0867f79bbdd2b38add23fced8e5ae071ce09f70
treec75bd662d3e363c90e07f291699bd1385b7ea06c
parent5584245f584edc88d02bdebf7864e31f086622c6
Optimizations for bytes reallocation.
This uses up to 12.5% overallocation, not entirely unlike list_resize().
Could probably use more tweaks for odd allocation patterns, TBD.

Also add __alloc__() method which returns the actually allocated size.

PS. I'm now convinced that we need something like "".join(); later.
Include/bytesobject.h
Objects/bytesobject.c