[SciPy-user] [Nipy-devel] how to wrap C++

David Cournapeau david at ar.media.kyoto-u.ac.jp
Thu Jan 18 03:16:07 CST 2007


Fernando Perez wrote:
>
> What I recall from a while ago, as relayed by John Hunter (matplotlib)
> and Prabhu Ramachandran (mayavi) was that while boost was great, the
> compile times and the resulting binary library sizes were completely
> out of control.  All that templating forces instantiation of an
> enormous number of classes, which makes both time and size explode, to
> the point of making both development and distribution seriously
> problematic.  Both John and Prabhu decided to go with other
> alternatives due to this, I think it was SWIG (whose C++ support has
> greatly improved).
>
> You might also want to have a look at this:
>
> http://www.scipy.org/PyRoot
I took a quick look at the slides, and wow, this looks pretty cool. I am 
wondering if this scales up well if you have a lot of communication 
between python and the C++ "backend"; the ability to catch memory 
problems looks impressive too, I am wondering how this is done, as they 
seem to keep everything in the same address space.

FWIW, I have used boost a bit with python, and while I find it more 
'elegant' than SWIG (well, as elegant as C++ can be), my experience is 
exactly the same than John and Prabhu. The compilation time is enormous 
to the point where it is really a pain to use on anything but really 
powerful computers, specially on linux where g++ is kind of slow at 
compiling C++,

cheers,

David


More information about the SciPy-user mailing list