[C++-sig] bindings size
dave at boostpro.com
Fri Jan 23 17:31:09 CET 2009
on Fri Jan 23 2009, Renato Araujo <renatox-AT-gmail.com> wrote:
> hi all,
> After some vacation I got back to my library binding. Most problems
> have been solved
> but now I got another big problem here. My current binding library is very huge
> compared to the wrapped C++ library (about four times). Checking the
> code I found
> that the components responsible for a great deal of the size are
> "class_" instantiation
> and ".def" functions. Without these functions my code size is about
> 300k and with
> these functions my code grows to enormous 4MB.
> I would like to know if there is a way to minimize the library size, some other
> function which I can call instead of ".def" functions, to minimize
> template usage,
> or some template call that I can transform into a function call.
The usual C++ tricks apply: turn on optimizations and inlining (if using
bjam add "release" to the command line), and strip symbols from the
result if on *nix.
More information about the Cplusplus-sig