This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++ PATH] tr1::bind support
Benjamin Kosnik wrote:
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.
Indeed, this morning, I woke up with a tought in mind: maybe, if there is a
quadratic behavior of sort around, scaling down to 10 parameters could help
a lot!
Thanks a lot Doug and Chris from me too, both for the analysis and the work.
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.
Yes. In my opinion, we should really start investigating that. Zack
mentioned
variadic templates and we are so lucky to have Doug as contributor:
would the
C++ front-end maintainers favor an experimental implementation of variadic
templates? In principle, I mean, we are doing (high quality ;)
science-fiction,
here...
Paolo.