[Pyrex] Can pyrex codes call python objects/methods such as String, re, datetime, os diretively
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Jul 2 23:39:44 UTC 2007
Andreas Kostyrka wrote:
> Well, my experience shows that if one knows the exact Python types
> returned, one can gain visible speedups (if not drastic) by using the
> specifiy Python type functions, instead of the more generic ones that
> Pyrex would generate.
Yes, you could try using things like PyList_GetItem and
PyTuple_GetItem, but I wouldn't expect these to be much
faster than using indexing notation, which already has
a pure-C path to the underlying code.
In this particular case, I expect that almost all the
slowness is due to the Oracle interface having to
construct Python objects representing the results from
the query. To get any spectacular speedup, you will
have to find a way of bypassing all that.
--
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