Wrapper for Cosmo3D swig vs c++

Sunil Hadap Sunil.Hadap at cui.unige.ch
Tue Feb 8 12:48:10 EST 2000


I am set for creating wrappers for SGI's Cosmo3D 3d graphics API. The
API is c++ one. As I count, there are around 100 classes, just to get
idea of the volume. I have 2 options

a) To use Swig - I learnt from the swig manual that it can help in
creating the Python classes as in Cosmo3D at the cost of performance.
I did not get the point. What I see is there is just a def statement
in the shadow class which  links class member function to a swig
generated wrapper function. I suppose def is a simple namespace alias
which is not a major overhead. I hope I am not wrong. Is this
something I should worry or just use swig with very minor performance

b) Use c or better c++ (CXX) api. Am I getting into a big task
considering 100 classes to wrap. Is it worth the performance I get. I
have not even studied c/c++ API, hence could not visualize how it will
improve the performance. After all swig will generate similar code
except with different namespace entries, and then the shadow class.

Thank you very much


"Live as if you would die tomorrow,
learn as if you would live forever." 
                    --Mahatma Gandhi

More information about the Python-list mailing list