This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH C++: speed up templates




--On Wednesday, February 19, 2003 12:29:31 PM -0800 Ziemowit Laski <zlaski at apple dot com> wrote:

I was not aware
of this functionality (and, it would appear, neither was Mark) until
Devang pointed it out to me yesterday.

I actually wrote walk_tree. :-)


The reason you can't use walk_tree_without_duplicates is given in for_each_template_parm. The addition of the hash table there is necessary both for correctness *and for compile-time performance* in some situations. The fact that it is not a win in other situations is a consequence of a broken design -- namely that we have to use for_each_template_parm in situations we should not.

Optimizing this at the low level is fine, but the real problems are further up the chain.

--
Mark Mitchell                mark at codesourcery dot com
CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]