On Thu, 26 Jun 2008 16:26:42 -0400
"Jay Parlar" <[EMAIL PROTECTED]> wrote:

> 
> So build an extension class that inherits from the base-type list?

no, but define the list-like methods (__getitem__ etc.)

> 
> If so, won't I still be presented with roughly the same problem?

> Within that extension class, I'll have to populate the internal
> structure of the list with my float values. Or is it because I can use
> the Python/C API calls to populate, instead of calling the
> Python-visible append() that will give me the performance?

You don't have to create/store python objects in your custom list.
Perhaps you could even alias the storage in your queue, and have
_zero_ copying.

It really depends where your bottleneck is, and what for/how often you are
using this get method. If all the work is being done at the python level
then i don't think any cython trickery will help. It's up to you to figure it 
out.

Simon.
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to