Big slowdown introduced in r92348

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Big slowdown introduced in r92348

Abramo Bagnara

Using as usual the big gcc.c source from

http://people.csail.mit.edu/smcc/projects/single-file-programs/

$ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c

real 0m3.792s
user 0m3.472s
sys 0m0.319s
$ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c

real 0m13.384s
user 0m13.046s
sys 0m0.335s

Using bisection I've found the culprit in commit r92348.

Why a modify to Sema::LookupTemplateName could impact a non C++ program
is beyond my comprehension, but perhaps the name of function is
misleading I don't know...


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Big slowdown introduced in r92348

Douglas Gregor

On Jan 11, 2010, at 9:16 AM, Abramo Bagnara wrote:

>
> Using as usual the big gcc.c source from
>
> http://people.csail.mit.edu/smcc/projects/single-file-programs/
>
> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>
> real 0m3.792s
> user 0m3.472s
> sys 0m0.319s
> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>
> real 0m13.384s
> user 0m13.046s
> sys 0m0.335s
>
> Using bisection I've found the culprit in commit r92348.
>
> Why a modify to Sema::LookupTemplateName could impact a non C++  
> program
> is beyond my comprehension, but perhaps the name of function is
> misleading I don't know...


The parser ends up calling into this code to find template names...  
but it shouldn't ever do that for C. I'll look into it; thanks for  
tracking down this performance regression!

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Big slowdown introduced in r92348

Douglas Gregor
In reply to this post by Abramo Bagnara
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100111/026231.html

On Jan 11, 2010, at 9:16 AM, Abramo Bagnara wrote:

>
> Using as usual the big gcc.c source from
>
> http://people.csail.mit.edu/smcc/projects/single-file-programs/
>
> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>
> real 0m3.792s
> user 0m3.472s
> sys 0m0.319s
> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>
> real 0m13.384s
> user 0m13.046s
> sys 0m0.335s
>
> Using bisection I've found the culprit in commit r92348.
>
> Why a modify to Sema::LookupTemplateName could impact a non C++  
> program
> is beyond my comprehension, but perhaps the name of function is
> misleading I don't know...

This should be fixed in r93207, here:

        http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100111/026231.html

I can't check your particular example on my system (since I don't have  
all of the headers that gcc.c relies on), but the change improved  
performance on Cocoa.h. Actually, since this change eliminates a bunch  
of extra name lookup, r93207 may even be faster than r92347 was.

        - Doug
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Big slowdown introduced in r92348

Abramo Bagnara
Il 12/01/2010 00:40, Douglas Gregor ha scritto:

> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100111/026231.html
>
>
> On Jan 11, 2010, at 9:16 AM, Abramo Bagnara wrote:
>
>>
>> Using as usual the big gcc.c source from
>>
>> http://people.csail.mit.edu/smcc/projects/single-file-programs/
>>
>> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>>
>> real    0m3.792s
>> user    0m3.472s
>> sys    0m0.319s
>> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>>
>> real    0m13.384s
>> user    0m13.046s
>> sys    0m0.335s
>>
>> Using bisection I've found the culprit in commit r92348.
>>
>> Why a modify to Sema::LookupTemplateName could impact a non C++ program
>> is beyond my comprehension, but perhaps the name of function is
>> misleading I don't know...
>
> This should be fixed in r93207, here:
>
>     http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100111/026231.html
>
>
> I can't check your particular example on my system (since I don't have
> all of the headers that gcc.c relies on), but the change improved
> performance on Cocoa.h. Actually, since this change eliminates a bunch
> of extra name lookup, r93207 may even be faster than r92347 was.

I've just tested it and now it's fast as before for gcc.c (not faster).

However I leave to you the evaluation about whether the slowdown
introduced by r92348 is appropriate or not for C++ programs.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Big slowdown introduced in r92348

Douglas Gregor

On Jan 12, 2010, at 2:41 AM, Abramo Bagnara wrote:

> Il 12/01/2010 00:40, Douglas Gregor ha scritto:
>> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100111/026231.html
>>
>>
>> On Jan 11, 2010, at 9:16 AM, Abramo Bagnara wrote:
>>
>>>
>>> Using as usual the big gcc.c source from
>>>
>>> http://people.csail.mit.edu/smcc/projects/single-file-programs/
>>>
>>> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>>>
>>> real    0m3.792s
>>> user    0m3.472s
>>> sys    0m0.319s
>>> $ time ~/llvm_opt/Release/bin/clang -w -fsyntax-only gcc.c
>>>
>>> real    0m13.384s
>>> user    0m13.046s
>>> sys    0m0.335s
>>>
>>> Using bisection I've found the culprit in commit r92348.
>>>
>>> Why a modify to Sema::LookupTemplateName could impact a non C++ program
>>> is beyond my comprehension, but perhaps the name of function is
>>> misleading I don't know...
>>
>> This should be fixed in r93207, here:
>>
>>    http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100111/026231.html
>>
>>
>> I can't check your particular example on my system (since I don't have
>> all of the headers that gcc.c relies on), but the change improved
>> performance on Cocoa.h. Actually, since this change eliminates a bunch
>> of extra name lookup, r93207 may even be faster than r92347 was.
>
> I've just tested it and now it's fast as before for gcc.c (not faster).

Okay, good.

> However I leave to you the evaluation about whether the slowdown
> introduced by r92348 is appropriate or not for C++ programs.

I'll look into that, too. Thanks.

        - Doug


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev