View Full Version : Re: Intel compiler vs GCC
John Jones
07-07-2003, 01:21 AM
On Sat, 5 Jul 2003 13:36:29 -0400, "Dan Johnson"
<danieljohnson[at]vzavenue.net> wrote:
>"John Jones" <jjones[at]hotmail.com> wrote in message
>news:ajqdgv4cdmn7jv0heml89897ke2255t1h6[at]4ax.com...
>> On Sat, 5 Jul 2003 08:37:06 -0400, "Dan Johnson"
>> <danieljohnson[at]vzavenue.net> wrote:
>> >Apple has only documented one that I know of. It is this: their new
>compiler
>> >can inline functions that occur after the point of call in the
>translation
>> >unit; the old one could only inline those that occured before the point
>of
>> >call.
>> >
>> >That is quite obviously an improvement that woudl benefit anybody's
>> >CPU.
>>
>> Can you please post a reference to this documented change? Thanks.
>
>It's in the release notes of the new build of GCC Apple recently posted
>to http://developer.apple.com; you will need an ADC account to use
>it, but you can get a free one.
>
>Download it and see if yourself.
OK...I've downloaded the compiler. Please provide the exact (I want to
be sure that we're reading the same file and section of that file)
file and text that you are referring to here. Thanks.
jj
Dan Johnson
07-08-2003, 01:04 AM
"John Jones" <jjones[at]hotmail.com> wrote in message
news:n5fhgvoqtolg4iqgjhfr46p5v9ui0udfcu[at]4ax.com...
> On Sat, 5 Jul 2003 13:36:29 -0400, "Dan Johnson"
> <danieljohnson[at]vzavenue.net> wrote:
> >It's in the release notes of the new build of GCC Apple recently posted
> >to http://developer.apple.com; you will need an ADC account to use
> >it, but you can get a free one.
> >
> >Download it and see if yourself.
>
> OK...I've downloaded the compiler. Please provide the exact (I want to
> be sure that we're reading the same file and section of that file)
> file and text that you are referring to here. Thanks.
Okay.
If you are using the usual directory structure, the file you want is
/Developer/Documentation/ReleaseNotes/GCC3.html
Look for the section titled "Optimization". Right before the -faltivec
switch is, there is a short section describing the improved inlining,
and the key sentence is this one:
"When performing function inlining, GCC 3 inlines forward
referenced functions, in addition to the functions it inlined
before."
The entire Optimization section is worth reading, though; Apple
is clearly claiming they made a difference to optimization.
John Jones
07-08-2003, 02:39 AM
On Mon, 7 Jul 2003 20:04:10 -0400, "Dan Johnson"
<danieljohnson[at]vzavenue.net> wrote:
>"John Jones" <jjones[at]hotmail.com> wrote in message
>news:n5fhgvoqtolg4iqgjhfr46p5v9ui0udfcu[at]4ax.com...
>> On Sat, 5 Jul 2003 13:36:29 -0400, "Dan Johnson"
>> <danieljohnson[at]vzavenue.net> wrote:
>> >It's in the release notes of the new build of GCC Apple recently posted
>> >to http://developer.apple.com; you will need an ADC account to use
>> >it, but you can get a free one.
>> >
>> >Download it and see if yourself.
>>
>> OK...I've downloaded the compiler. Please provide the exact (I want to
>> be sure that we're reading the same file and section of that file)
>> file and text that you are referring to here. Thanks.
>
>Okay.
Thanks...I wanted to ensure that we were reading the same material. It
looks as if we are.
>If you are using the usual directory structure, the file you want is
>
>/Developer/Documentation/ReleaseNotes/GCC3.html
>
>Look for the section titled "Optimization". Right before the -faltivec
>switch is, there is a short section describing the improved inlining,
>and the key sentence is this one:
>
>"When performing function inlining, GCC 3 inlines forward
>referenced functions, in addition to the functions it inlined
>before."
>
>The entire Optimization section is worth reading, though; Apple
>is clearly claiming they made a difference to optimization.
Is Apple really claiming that they made these optimizations? Or are
the merely listing what improvements have been made to GCC in general?
If you read the text it states:
"GCC 3.3 has greatly improved code optimization, especially for
Altivec code."
The document itself is titled:
"GCC 3.3 Release Notes"
It appears to me that Apple is simply listing the improvements in GCC
3.3. Not their improvements to GCC. This is further evidenced by the
generic GCC 3.3 documentation which lists the very optimizations that
you claim Apple made:
http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Optimize-Options.html#Optimize%20Options
Search for the text "-finline-functions". They're you'll find that the
generic version of GCC has the very functionality that you said didn't
exist. Right below this you will find "-finline-limit= n"...another
switch mentioned within the release notes Apple provided. Then there's
this article I found on slashdot yesterday:
http://www.acm.uiuc.edu/sigmil/RevEng/ch02.html
Where it states:
"There are also several fine-grained assembly options that are
specified with the -f flag. The most interesting are -funroll-loops,
-finline-functions, and -fomit-frame-pointer."
See where they mention the "-finline-functions" flag? And a couple of
sentences later we find:
"Inlining functions means to effectively convert all functions in a
file to macros, and place copies of their code directly in line in the
calling function (like the C++ inline keyword). This only applies for
functions called in the same C file as their definition. It is also a
relatively small optimization."
All this points to the fact that your assertion of Apple having made
these modifications and not making them available to the P4 platform
as being wrong.
Your argument has now been proven wrong.
See what I meant by saying that one should investigate before making
accusations?
jj
Dan Johnson
07-08-2003, 10:00 PM
"John Jones" <jjones[at]hotmail.com> wrote in message
news:c17kgvshsl2cjfjcpaj3tgl6kq06e8jc35[at]4ax.com...
> On Mon, 7 Jul 2003 20:04:10 -0400, "Dan Johnson"
> <danieljohnson[at]vzavenue.net> wrote:
> >The entire Optimization section is worth reading, though; Apple
> >is clearly claiming they made a difference to optimization.
>
> Is Apple really claiming that they made these optimizations?
Why yes, yes they are.
> Or are the merely listing what improvements have been made to
> GCC in general?
Of course not.
> If you read the text it states:
>
> "GCC 3.3 has greatly improved code optimization, especially for
> Altivec code."
Yes, it does.
> The document itself is titled:
>
> "GCC 3.3 Release Notes"
>
> It appears to me that Apple is simply listing the improvements in GCC
> 3.3.
Wishful thinking, I'm afraid. To be charitable.
> Not their improvements to GCC. This is further evidenced by the
> generic GCC 3.3 documentation which lists the very optimizations that
> you claim Apple made:
>
>
http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Optimize-Options.html#Optimize%20Options
No, this does not list the change I said Apple made. Or at least
I do not see it there; perhaps you could point to the passage
you think proves your point, if there is one. None of the ones
you quote describe what the release notes say Apple did.
They describe the more limited inlining GCC has long had;
the text appears to be identical to the docs for the older
versions of GCC, like 3.1.
> Search for the text "-finline-functions". They're you'll find that the
> generic version of GCC has the very functionality that you said didn't
> exist.
You are misrepresenting my words again; I did not ever
claim that GCC could not inline any functions.
> Right below this you will find "-finline-limit= n"...another
> switch mentioned within the release notes Apple provided. Then there's
> this article I found on slashdot yesterday:
>
> http://www.acm.uiuc.edu/sigmil/RevEng/ch02.html
>
> Where it states:
>
> "There are also several fine-grained assembly options that are
> specified with the -f flag. The most interesting are -funroll-loops,
> -finline-functions, and -fomit-frame-pointer."
These switches have existed for some time, of course;
Apple improved the optimization by making it work on
forward referenced functions. Nothing in this UIUC document
suggests that GCC had this ability before Apple's build.
> See where they mention the "-finline-functions" flag? And a couple of
> sentences later we find:
>
> "Inlining functions means to effectively convert all functions in a
> file to macros, and place copies of their code directly in line in the
> calling function (like the C++ inline keyword). This only applies for
> functions called in the same C file as their definition. It is also a
> relatively small optimization."
I am well aware of what inlining is, I assure you.
You might be interested to know that the way the C++
inline keyword is usually implemented, it has no effect when
used on a forward-declared method.
> All this points to the fact that your assertion of Apple having made
> these modifications and not making them available to the P4 platform
> as being wrong.
I'm afraid you are either being dishonest, or you just
don't understand what those documents are saying.
> Your argument has now been proven wrong.
>
> See what I meant by saying that one should investigate before making
> accusations?
Yes; and I'm not surprised that you'd find sources
to misrepresent to try to "prove me wrong".
I am (irrationally) pleased, however, that you were not
able to do so using the release notes themselves.
John Jones
07-08-2003, 10:53 PM
On Tue, 8 Jul 2003 17:00:27 -0400, "Dan Johnson"
<danieljohnson[at]vzavenue.net> wrote:
>"John Jones" <jjones[at]hotmail.com> wrote in message
>news:c17kgvshsl2cjfjcpaj3tgl6kq06e8jc35[at]4ax.com...
>> On Mon, 7 Jul 2003 20:04:10 -0400, "Dan Johnson"
>> <danieljohnson[at]vzavenue.net> wrote:
>> >The entire Optimization section is worth reading, though; Apple
>> >is clearly claiming they made a difference to optimization.
>>
>> Is Apple really claiming that they made these optimizations?
>
>Why yes, yes they are.
>
>> Or are the merely listing what improvements have been made to
>> GCC in general?
>
>Of course not.
>
>> If you read the text it states:
>>
>> "GCC 3.3 has greatly improved code optimization, especially for
>> Altivec code."
>
>Yes, it does.
>
>> The document itself is titled:
>>
>> "GCC 3.3 Release Notes"
>>
>> It appears to me that Apple is simply listing the improvements in GCC
>> 3.3.
>
>Wishful thinking, I'm afraid. To be charitable.
>
>> Not their improvements to GCC. This is further evidenced by the
>> generic GCC 3.3 documentation which lists the very optimizations that
>> you claim Apple made:
>>
>>
>http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Optimize-Options.html#Optimize%20Options
>
>No, this does not list the change I said Apple made. Or at least
>I do not see it there; perhaps you could point to the passage
>you think proves your point, if there is one. None of the ones
>you quote describe what the release notes say Apple did.
>
>They describe the more limited inlining GCC has long had;
>the text appears to be identical to the docs for the older
>versions of GCC, like 3.1.
>
>> Search for the text "-finline-functions". They're you'll find that the
>> generic version of GCC has the very functionality that you said didn't
>> exist.
>
>You are misrepresenting my words again; I did not ever
>claim that GCC could not inline any functions.
>
>> Right below this you will find "-finline-limit= n"...another
>> switch mentioned within the release notes Apple provided. Then there's
>> this article I found on slashdot yesterday:
>>
>> http://www.acm.uiuc.edu/sigmil/RevEng/ch02.html
>>
>> Where it states:
>>
>> "There are also several fine-grained assembly options that are
>> specified with the -f flag. The most interesting are -funroll-loops,
>> -finline-functions, and -fomit-frame-pointer."
>
>These switches have existed for some time, of course;
>Apple improved the optimization by making it work on
>forward referenced functions. Nothing in this UIUC document
>suggests that GCC had this ability before Apple's build.
>
>> See where they mention the "-finline-functions" flag? And a couple of
>> sentences later we find:
>>
>> "Inlining functions means to effectively convert all functions in a
>> file to macros, and place copies of their code directly in line in the
>> calling function (like the C++ inline keyword). This only applies for
>> functions called in the same C file as their definition. It is also a
>> relatively small optimization."
>
>I am well aware of what inlining is, I assure you.
>
>You might be interested to know that the way the C++
>inline keyword is usually implemented, it has no effect when
>used on a forward-declared method.
>
>> All this points to the fact that your assertion of Apple having made
>> these modifications and not making them available to the P4 platform
>> as being wrong.
>
>I'm afraid you are either being dishonest, or you just
>don't understand what those documents are saying.
>
>> Your argument has now been proven wrong.
>>
>> See what I meant by saying that one should investigate before making
>> accusations?
>
>Yes; and I'm not surprised that you'd find sources
>to misrepresent to try to "prove me wrong".
>
>I am (irrationally) pleased, however, that you were not
>able to do so using the release notes themselves.
Why am I not surprised that you again resorted to personal attacks.
You were proven wrong. Anyone reading this thread can see that. If you
want to stick your head into the sand and pretend that it doesn't
exist...that's fine. You'll just look foolish.
jj