[Pyrex] Python object in a struct field

Andreas Kostyrka andreas at kostyrka.org
Tue Feb 8 22:00:32 CET 2005


On Tue, 2005-02-08 at 15:34 +0530, Tom Locke wrote:
> sjmachin at lexicon.net wrote:
> 
> >Sure did:
> >
> >http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/version/Doc/extension_types.html
> >  
> >
> Thanks - this looks like it's the way to go for my optimization - I can 
> convert my Python classes to extension types, and attributes will be 
> stored in a C struct for fast access.
> 
> I see I can also use 'cdef' methods in the extension type, but I notice 
> these are virtual, so I assume I will be able to reduce the call 
> overhead by moving these out to top-level cdef functions, right?
Probably. OTOH the performance improvment from Python Methods -> C++
virtual methods is the bigger improvement.

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20050208/2e192901/attachment.bin


More information about the Pyrex mailing list