[SciPy-Dev] Bundling Boost?
Charles R Harris
Sun Oct 7 11:21:45 CDT 2012
On Sun, Oct 7, 2012 at 9:40 AM, Pauli Virtanen <email@example.com> wrote:
> I'd like to consider replacing some of the function implementations in
> scipy.special with versions from the C++ Boost library, cf.
> The reason is that these implementations appear to be made with more
> care than what we use currently, and behave more correctly in corner
> cases (cf. e.g. ticket #1740).
> To minimize work, it would be useful just to use the Boost functions
> direcly, rather than doing manual C transcriptions. The drawback here is
> that the portion of Boost library required weights about 8 MB of source
> code, and we would most likely like to bundle it, as it is not really a
> standard part of many installations. This does not reflect much on the
> compiled binary size, however.
> I'm not 100 % certain about the compiler support. Perhaps C++ is already
> mature enough to work across the platforms we care about.
> I'm not aware of many good BSD-compatible floating-point special
> function libraries, so if you know others, or would be opposed to
> bundling Boost, please chime up!
I think using the boost library is a good idea. It is well tested and looks
to support quad precision, something we will probably want at some point.
It also looks to be highly templated and tightly integrated, so I suspect
getting it properly interfaced might be non-trivial. The same holds for the
distributions, but we have done much the same. It might be worth looking
over the boost classes for some ideas.
As to the size of the code, the current scipy/special library is ~40MB and
I expect we can get rid of some of that. We should check for LLVM
compatibility to make sure Apple isn't a problem, but it looks like most
other C++ compilers will work, Boost does try hard for universality.
Compile times will probably increase if we keep all the templates.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev