[Python-Dev] Proposal to eliminate PySet_Fini
"Martin v. Löwis"
martin at v.loewis.de
Mon Jul 3 08:19:14 CEST 2006
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
More information about the Python-Dev
mailing list