[PyKDE] SIP overhead
Phil Thompson
phil at river-bank.demon.co.uk
Fri Oct 11 23:43:01 BST 2002
On Friday 11 October 2002 10:26 pm, Sato, Kristine wrote:
> I have just started looking at SIP as an alternative to SWIG for wrapping
> C++ code for use with Python. The drawback with SWIG is that you must
> generate "shadow classes" in Python in order to access your wrapped class
> as a Python class. This introduces overhead I would like to avoid.
>
> I know little about SIP as of yet, trying to read through as much
> documentation as I can find. Any information on its efficiency and
> comparison to SWIG is much appreciated!
SIP also generates a Python class for each C++ class being wrapped - but this
is done fairly efficiently. It is only the class itself - the class methods
are only created as they are needed. As PyQt has several thousand class
methods, creating a shadow class complete with shadow methods would take far
too long to initialise and take up far too much memory.
Phil
More information about the PyQt
mailing list