[libstdc++ PATH] tr1::bind support
Benjamin Kosnik
bkoz@redhat.com
Wed Mar 23 06:06:00 GMT 2005
> What can we do? For one, we can scale back to 10 parameters across the
> board. It's the minimum requirement, and although I'd like more
> parameters it just takes too long to compile. But, we're still 3 times
> slower than the Boost equivalents. We can try to reduce the header
> dependencies a bit (for instance, <tr1/functional> ends up including
> <string>, which includes <algorithm>, etc.) and factor out the core
> parts of <tr1/functional> that <tr1/tuple> needs, so that it doesn't
> incur all of that overhead. The long-term solution is probably
> something like variadic templates, but that's a big undertaking for a
> potentially esoteric feature that still hasn't been completely defined
> :)
Thanks for the analysis. I think having the machinery to do more than 10
parameters, but only actually doing 10 parameters by default is fine.
For string, you may want to try using <bits/stringfwd.h> if you can get
away with it.
I don't want to belabor this point (but perhaps have already done so),
but I think experimenting with designs such as tuple et. al that
implicitly require variadic templates really necessitate some kind of
experimental compiler support.
I am leery of the trickery and complexity involved in the current
implementations of these features, although I consider the implementors
themselves quite capable. :)
Anyway. I've added c++/20599 as a feature request for this.
I'm assuming 200409 (Pre Redmond) N1704 is the best reference?
best,
benjamin
More information about the Libstdc++
mailing list