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: C++ PATCH to use hash tables for template specialization lookup


Hi,
> Someone recently sent me an expression template testcase, complaining
> about how slow compilation was; looking at it with callgrind, I saw
> that fully 64% of compilation was spent in retrieve_specialization,
> walking lists of specializations and comparing all the arguments.  So
> I set out to switch GCC over to use hash tables for template lookup.
>
> The good news: the patch significantly reduces compile time (~25%) for
> that example.
>
> The mediocre news: the patch doesn't significantly affect compile time
> for the regression testsuite; testrun time is about the same before
> and after the patch.
I'm wondering if the benchmarks in Appendix C of "C++ Template
Metaprogramming" would be sensitive to such change... If you already
know the answer please stop me as soon as possible, otherwise, I'll
probably do some measurements over the next days...

Paolo.


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