Re: [Gccpy-devel] [PATCH] struct gpy_object_list: remove the "length" attribute.
Python Front-end to GCC
Brought to you by:
redbrain812
From: Philip H. <red...@gc...> - 2013-05-21 21:32:10
|
Ah cool sounds good to me, i havent added in slice support yet so list[index] doesn't work yet but i have a patch in progress to have that i should push up because it relies on the compiler generating code for it. --Phil On 21 May 2013 14:11, Cyril Roelandt <tip...@gm...> wrote: > 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. > |