Am 2013-08-22 01:12, schrieb Robert Bradshaw:
Using a Python list is probably the fastest way to iterate over an
array of Python objects--it's a PyObject** under the hood and Cython
uses the C API calls to get at it.
Ok, thanks for the clearification.
Your check might be the
bottleneck,
On 22 August 2013 14:10, Daniel Krenn kr...@aon.at wrote:
Am 2013-08-22 01:12, schrieb Robert Bradshaw:
Using a Python list is probably the fastest way to iterate over an
array of Python objects--it's a PyObject** under the hood and Cython
uses the C API calls to get at it.
Ok, thanks for
On Thursday, August 22, 2013 6:21:13 AM UTC-7, John Cremona wrote:
Then use srange() which yields Integers.
John
The appropriate answer should be: use xsrange, unless you explicitly need
the integers as a list. The extra memory footprint of srange will probably
be detrimental to
I need an array of Elements of RealIntervalField and I want to iterate
(a lot of times) through it. How can I do that in a fast way in Sage's
cython (i.e. in the notebook or in a .spyx-file)?
An (minimal) example what I basically want is given below (PS).
I tried the following things (and a lot
Using a Python list is probably the fastest way to iterate over an
array of Python objects--it's a PyObject** under the hood and Cython
uses the C API calls to get at it. Your check might be the
bottleneck, especially if it's a Python call.
Also, no need to write this as a while loop; just use