> Well, yes, it doesn't run out of memory, but if pymalloc needs > to allocate lots of objects of the same size, then performance > degrades due to the management overhead involved for checking > the free pools as well as creating new arenas as needed. > > To reduce this overhead, it may be a good idea to preallocate > pools for common sizes and make sure they don't drop under a > certain threshold.
I still can't see why this could speed up anything. The total time will be the same - whether you allocate them in advance or on demand should make no difference. In any case, if you think that you can improve things, please submit a patch. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com