[Pyrex] python dictionaries with unsigned long long keys and values

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 15 22:33:50 UTC 2007


Sam Tannous wrote:

> For speed, where (and how) should one create these
> lists of unsigned long longs?  Just use Numeric?

That's one way, and it might be the best if you
can bring Numeric's array operations to bear on
the problem.

Will your lists need to grow dynamically? If so,
you might be better off using Python's built-in
array type, although its interface isn't public,
so you would have to dig into the Python sources
to find out how to declare it to Pyrex for
C-level access.

Or you could write an extension type that does
its own memory management the way you want.

--
Greg



More information about the Pyrex mailing list