[C++-sig] Loading Boost.Python made bindings is horribly slow?
Niall Douglas
s_sourceforge at nedprod.com
Fri Apr 2 21:07:57 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2 Apr 2004 at 13:10, Stefan Seefeld wrote:
> > (Here's a thought - GCC outputs far too many symbols into the public
> > ELF table - if GCC had a dllexport/dllimport mechanism like on
> > Windows, the amount of symbols needing to be linked could be reduced
> > very significantly indeed. As it so happens, someone submitted a
>
> The simplest thing to do (in this particular context) is to put
> everything into an anonymous namespace. Everything but the actual
> python module init function ('BOOST_PYTHON_MODULE()'). That should
> restrict the number of the exposed symbols to a strict minimum.
No, most of the symbols come from instantiations of items from the
BPL headers and these exist inside the boost::python namespace. The
number of symbols generated by the class wrappers (the only thing you
can put inside an anonymous namespace as the Export_XXX function must
remain linkable) is no more than 5% at most I'd guess.
If you take a dump using elfdump (I think), you'll see what I mean.
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBQG26DsEcvDLFGKbPEQJHhACfXmMPexBHp6ZoFWNCti7jlYwAuTUAoPsl
r0uwQen+29jbn10GKl+dltc7
=zmWC
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list