[issue2039] Pymalloc patch for int and float objects

Andrew I MacIntyre report at bugs.python.org
Wed Feb 20 13:23:14 CET 2008


Andrew I MacIntyre added the comment:

My conclusions from the testing I've just reported:
- there are some contradictory results which make little (obvious)
sense, but the testing has been repeated a number of times and nearly
all tests repeat to with 1%;
- leave the int freelist as is, but move the compaction into
gc.collect() as suggested by tiran in a python-dev posting;
- keep the small int cache (it may profitably be increased to cover 
a wider range of ints, perhaps -256..1024?? - more testing required);
- the float freelist and float LIFO, while being attractive in
micro-benchmarks, are not useful enough to keep in large scale usage. 
This is especially the case when you consider that floats are much less
prevalent than ints in a wide range of Python programs.  Serious float
users gravitate to Numpy and other extensions in most cases, and the
simpler memory profile has its own attractions.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2039>
__________________________________


More information about the Python-bugs-list mailing list