[issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32?

Marc-Andre Lemburg report at bugs.python.org
Mon Jun 8 10:05:18 CEST 2009


Marc-Andre Lemburg <mal at egenix.com> added the comment:

I think we should also consider raising the free list limit
of currently 1024 objects.

The keep-alive optimization currently uses at most 1024 * 9 * 2
= 18432 bytes (+ pymalloc overhead) on a UCS2 build of Python in
the worst case.

With a limit of 32 you get 65536 bytes.

Given that Unicode objects are one of the most used object in
Python 3k and looking at todays CPU cache sizes, it would
probably be fair to allocate up to 256kB for such an
optimization, e.g. by allowing up to 4096 objects to reside
in the free list.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6216>
_______________________________________


More information about the Python-bugs-list mailing list