> Actually, it would be interesting to see if a fast __getitem__ call
> would be available, since that would facilitate writing fast
> specialized iterators easily.

There are faster ways of doing this, but only if you know the type of
object that you're accessing with the [ ].  Cython uses optimized
versions to access lists (and tuples I think), which do speed things
up.  The fastest is if it is a numpy array
(http://docs.scipy.org/doc/), where cython uses the underlying c
pointers to directly get the item, which is be orders of magnitude
faster.

--Hoyt



--

++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ [EMAIL PROTECTED]
++++++++++++++++++++++++++++++++++++++++++
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to