[Pyrex] C-API implementation in Pyrex 0.9.6

Stefan Behnel stefan_ml at behnel.de
Tue Oct 16 09:54:30 CEST 2007


Greg Ewing wrote:
> Stefan Behnel wrote:
>> Pyrex could put the public fields directly
>> into the type struct and provide a straight fixed-size pointer to a
>> struct with the private fields and methods
> 
> That's a possibility, although it would add a pointer to the
> size of every object struct for every level of subclassing,
> even if there were no private fields (the pointer needs to
> be allocated anyway, in case private fields are added later).

There already is quite a bit of overhead anyway for extension types, just look
at the traditionally close-to-empty special method descriptors. Since
inheritance chains of more than, say, five levels should be rare enough, I
don't think it would *add* any major overhead.

I'll see if I can get the Cython merge back running (the merge of Pyrex
0.9.6.2 was pretty heavy due to a lot of reimplementation of redundant
functionality). Once that's done, I can try to come up with an implementation.

Stefan



More information about the Pyrex mailing list