[Pyrex] fan mail; ideas for the future?

Josiah Carlson jcarlson at uci.edu
Tue Oct 11 09:17:10 CEST 2005


"William Stein" <wstein at ucsd.edu> wrote:
> The main improvement I would like in Pyrex is more
> work on optimization of the C code it produces.  For example, Pyrex could
> probably generate code that more efficient uses the C library to access
> elements of a list.

Because of __get/setitem__ semantics, knowing that a particular object
is a list, dictionary, array, string, etc., is a bit difficult.  You may
find that using PyList_Get/SetItem() to be far faster (I did) if you
know for certain that an object is a list (but be careful if it isn't!)

 - Josiah




More information about the Pyrex mailing list