Re: [Gccpy-devel] [PATCH] struct gpy_object_list: remove the "length" attribute.
Python Front-end to GCC
Brought to you by:
redbrain812
From: Cyril R. <tip...@gm...> - 2013-05-21 21:28:13
|
On 05/21/2013 09:14 PM, Philip Herron wrote: > Looks like a good idea, are you considering moving to a new list > implementation aswell? I will apply this patch makes a lot more sense. I am > working on adding more documentation to the wiki but its going slow. > I checked the Python implementation, and, iirc, they also use a vector, and preallocate memory every time it has to be resized, so that operations such as append() or extend() are not too expensive. I thought of moving to a "real" list implementation, but that would probably not be a good idea in the end, since Python lists also work as arrays (ie l[index] must be fast). Cyril Roelandt. |