MinGW and Python

Scott David Daniels scott.daniels at acm.org
Tue Apr 25 12:14:49 EDT 2006


sturlamolden wrote:
> Robert Kern wrote:
>> - gcc does not optimize particularly well.
> That is beyond BS. 

> The more recent gcc releases optimize as well as any
> commercial compiler. 

   This is an outrageous claim.  Having worked a bit doing
compilers, I no of no commercial compiler that would have
a leg to stand on if it claimed it optimized "as well as
any commercial compiler."

   There are compilers and compiler experts out there in the
weeds that can (and regularly do) compile the hell out of code.
I took classes from one of these guys, and now he works in a
little company that does exactly that for particular customers
and problems.

   Uncle Timmy, used to work for some of the places that employed
some of these experts.  There is no "fully optimized state" for
compiled code (if the resultant instruction stream is greater
than a few hundred instructions); everyone approximates optimization.
It is almost inevitably a grey trade-off of compile time to speed
of resulting code over certain distributions of problems.

   To say "gcc does a credible job of optimization" would not be
outrageous.  To say "gcc optimization beats tool X on benchmark Y
on hardware Z by 1.237%" is a claim that could be made supportably,
but it would probably have to be accompanied with "using optimization
switches gcc-W for gcc and X-W for tool X."

   I expect gcc does a reasonably good job of optimization, but the
best optimizers (as far as I know) are done by a relatively small
number of people who fully understand the workings of the optimizer
and its current workload, the workings of the hardware in question
as well, and have chosen a portion of that workload to become expert
in.  Gcc does not have that expertise available to support people
to do things like that (nor does it need to).  They don't need (or
want) to become wed to one architecture, but to do the best optimization
you must at some point get married.

The gcc team does a great job at what they do; blind defense of them
discredits the good work they do.

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list