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

Fernando Perez fperez.net at gmail.com
Thu Jan 18 12:28:26 CST 2007


On 1/18/07, David Cournapeau <david at ar.media.kyoto-u.ac.jp> wrote:
> 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++,

Keep in mind that I wasn't suggesting using Root itself, but rather
trying to use their strategy for C++-Python coupling.  Wim (the author
of the slides) mentioned they'd try to separate that component from
PyRoot itself, you might want to email him and ask how far along that
has gone (or how hard it would be to rip it out yourself).

I also come from a high-energy background so I'm reasonably familiar
with Root's reputation, and I don't think I'd foist it on anyone who
hasn't harmed me before :)

Cheers,

f


More information about the SciPy-user mailing list