Jack Diederich wrote: > PyObject_MALLOC does a good job of reusing small allocations but it > can't quite manage the same speed as a free list, especially for things that > have some extra setup involved (tuples have a free list for each length).
I would question that statement, for any practical purposed. The cost of tuple comes from setting the elements to NULL, and that has to be done regardless of whether they were allocated new or came from the list. Likewise, the GC management has to be done regardless. So I expect that the speedup is rather minor, and not worth it. 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