This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: using templates in shared library
- To: mrs at wrs dot com (Mike Stump)
- Subject: Re: using templates in shared library
- From: Kasper Peeters <K dot Peeters at damtp dot cam dot ac dot uk>
- Date: Wed, 9 Dec 1998 22:58:09 +0000 (GMT)
- Cc: egcs at egcs dot cygnus dot com
- References: <199812092154.NAA04201@kankakee.wrs.com>
> ? Give us some hard numbers as to the cycles wasted. I don't think
> it'll amount to much in a real project.
On my machine, -frepo repeatedly compiles my sources until all
templates are done. When it does that n times, it is roughly n times
slower than the default, which instantiates all templates
immediately. (I know, it's not that bad, but this estimate is pretty
close in a real-world, slow nfs, bad caching situation).
> I see no reason why it can't, we look forward to a submission for this
> enhancement from you. :-)
Sorry, there are only 25 hours in a day and mine are filled twice
already. If someone could hold my hand and point me at the proper
place in the source tree I might be tempted to give it a try, but I
don't have time for an extensive study of the egcs internals first.
I'm just a little surprised to hear that this feature is not already
somewhere high on the wish list or even implemented a long time
ago. Does everyone really do all instantiations by hand when things
get more complicated than creating a single large binary? Or do you
all accept duplicate code on disk? I've never seen any project that
uses the -frepo solution in the way Mike proposed it either.
Kasper