[SciPy-Dev] Bundling Boost?

josef.pktd@gmai... josef.pktd@gmai...
Sun Oct 7 20:26:39 CDT 2012


On Sun, Oct 7, 2012 at 3:52 PM, Ralf Gommers <ralf.gommers@gmail.com> wrote:
>
>
> On Sun, Oct 7, 2012 at 6:21 PM, Charles R Harris <charlesr.harris@gmail.com>
> wrote:
>>
>>
>>
>> On Sun, Oct 7, 2012 at 9:40 AM, Pauli Virtanen <pav@iki.fi> wrote:
>>>
>>> Hi,
>>>
>>> I'd like to consider replacing some of the function implementations in
>>> scipy.special with versions from the C++ Boost library, cf.
>>>
>>> http://www.boost.org/doc/libs/1_51_0/libs/math/doc/sf_and_dist/html/index.html
>>>
>>> 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.
>
>
> An obvious worry is Windows. MinGW is explicitly not supported, and "may or
> may not work":
> http://www.boost.org/doc/libs/1_51_0/more/getting_started/windows.html

I think that line refers only to MSYS shell, not to MinGW compiler.

A few years ago I managed to get quantlib with python bindings build
on top of boost with MinGW without too much problems, given that I had
not much idea of what I was doing. (I'm not sure I didn't get boost
binaries and only build quantlib)

It looks like there are lots of instructions and examples building
boost with mingw on the web.

Josef

>
>>>
>>>
>>> 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.
>
>
> It's ~11Mb for me.
>
>> 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.
>
>
> That's a much bigger worry than how many Mb of source code it is. Does
> anyone have an idea of how much compile time would increase and how much RAM
> it would use?
>
> Ralf
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>


More information about the SciPy-Dev mailing list