[Pyrex] Pyrex idioms and optimizations?
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Jul 12 07:23:29 CEST 2007
skip at pobox.com wrote:
> Googling for "pyrex optimization" doesn't turn up much. I'm wondering
> what's improved since 2004.
Not much, really. I'm still intending to do these things,
I just haven't got around to it yet. I've been too
busy with other things to find the time to concentrate
on Pyrex much recently.
> mylist = []
> for x in anotherlist:
> PyList_Append(mylist, x.someattr)
> Pyrex should be able to do the PyList_Append trick for
> me under the covers.
Yes, another thing I'm considering is teaching it about
some of the builtin types such as list and dict, so you
could write
cdef list mylist
mylist.append(foo)
and have it generate PyList_Append(mylist, foo).
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand | (I'm not a morning person.) |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Pyrex
mailing list