Boost logo

Boost :

Subject: [boost] [boost.random] Dependencies/modularization
From: Philip Bennefall (philip_at_[hidden])
Date: 2013-12-01 18:44:08


Hi all,

I know that I have brought up this subject before and that work is being
done to improve the situation, but I just wanted to ask about a specific
case that I came across today while attempting to extract a subset of Boost.
I want to use mersenne_twister.hpp, uniform_int_distribution.hpp and
uniform_real_distribution.hpp from boost.random as part of an open source
library that I am developing. Since the only part of Boost that I am using
in that library is the Mersenne Twister prng, I figured I would ship the
relevant headers along with my own source distribution. I used bcp to scan
my code which includes these three headers, and I get a directory which is
2.89 MB in size and which contains 304 files. I looked at what is being
included, and in order of size the worst offenders are as follows:

preprocessor - 1.82 MB

type_traits - 604 KB

config - 250 KB

The other libraries that are included are tiny, and I would not consider
config to be a problem either. Clearly, preprocessor is the worst offender
by far here in terms of bloat. I wonder if there is an easy way to get rid
of the dependency on that library without hacking Boost too much? As for
type_traits, it seems a bit large for what I gather it is being used for in
this case but is not the end of the world either. Does anyone have any
suggestions? Will the modularization of Boost reduce these dependencies in
the not too distant future? I know that a huge effort is being spent moving
Boost to Git, but I am curious to know whether there is a roughly estimated
timeline for the modularization work?

Kind regards,

Philip Bennefall


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk