[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why you are wrong [Was: On linux kernel packaging issue]

On Tue, Nov 11, 2003 at 10:19:58AM +0000, Will Newton wrote:
> On Monday 10 Nov 2003 19:54, Andrew Suffield wrote:
> > We refuse to accept it blindly because it's wrong. There have been
> > cases when architecture-specific optimisations have made programs run
> > slower (recently the instruction ordering for that via i686 chip
> > comes to mind); GCC gets it wrong from time to time, and there's no
> > reason to think it's currently right (since everybody who asserts it
> > is has failed to provide anything but circumstancial evidence, and
> > we all know that software sucks).
> Don't all these arguments apply to architecture independent optimizations 
> also?

Yes. And actually, those have the same problem. We blithely use -O2
for most things, but in fact -Os can be faster on some processors with
some programs (-O3, on the other hand, can often make things

However, the status quo wins out here again. We'd need compelling
evidence to go around changing from -O2 to -Os.

Meanwhile, we *do* have compelling evidence that -O2 is usually better
than -O0, and furthermore we have evidence that it breaks in some
cases, leading some packages to be compiled with different sets of
optimisation flags.

> Incidentally, your standard of proof "There have been cases" is pretty weak, I 
> would say "there have been cases" where architectural optimizations have 
> increased performance.

You're making the exact same mistake that I was describing.

Basic predicate logic:

Let the statement under test be "For all X, p(X) is true".

What I said is:

Let there be a value A such that p(A) is false.
The statement is therefore false.

What you are saying is:

Let there be a value B such that p(B) is true.

This neither proves nor disproves the statement under test. However,
it proves this different statement: "There exists an X such that p(X)
is true".

Be very careful about the difference between "For all" and "There
exists". It is parallel to the difference between "and" and "or".

Here is my point again, in terms of semiformal logic:

Let X be a program and p(X) be the predicate "X runs faster with this
set of optimisations". Now, "For all X, p(X) is true" leads us to
conclude that we should apply these optimisations to all programs,
while "There exists an X such that p(X) is true" leads us to ask "For
what values of X?", and apply those optimisations to just those

  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature

Reply to: