PATCH C++: speed up templates

Mark Mitchell mark@codesourcery.com
Fri Feb 21 21:56:00 GMT 2003



--On Friday, February 21, 2003 12:35:53 PM -0800 Mike Stump 
<mstump@apple.com> wrote:

> On Friday, February 21, 2003, at 11:58 AM, Mark Mitchell wrote:
>>> I've already submitted a patch to solve that problem:
>>>
>>> http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01245.html
>>>
>>> It needs cleaning up per your instructions.  I'll see about turning it
>>> around today.
>>>
>>> With that patch in, then another patch, see below, can be used to turn
>>> off the hash tables, and remove the regression what was put into the
>>> compiler, while preserving the goodness of the walk.  Does this part
>>> look
>>> ok for 3.3, pending the other work?
>>
>> Why is OK not to avoid circularity if fn is 0?
>
> Circularity is avoided by computing and storing the answer to the
> question, does this type use template params?  It turns out that one
> additional hunk is needed, a short circuit at the top of
> uses_template_params to just return the previously computed answer, if we
> have one.

That makes sense; good.  I think this is a good approach for 3.3.

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



More information about the Gcc-patches mailing list