Proebsting's Law

Dominic Mitchell dom at
Wed Dec 14 20:10:38 GMT 2005

On Wed, Dec 14, 2005 at 12:00:23PM +0000, Paul Makepeace wrote:
> Perl people cry "benchmark!" (or pedantically, "profile!") as soon as
> optimizations are mentioned but has anyone here actually done it with
> gcc??
> Pick some code, gcc -O3 and gcc it and run them.
> I bet there's *much* more than 4% difference[1]. Ten years ago I was
> futzing around with assembly code generated for sparcs, comparing various
> optimizations. The differences were orders of *magnitude* not percentage
> points. In fact some of the optimizations appeared to me so clever I
> could barely follow the assembly language despite it being only about six
> lines of math & pointer arithmetic in C.

This is all very well, but the majority of programs are i/o bound, not
CPU bound.  So the optimisation is useful, but less important.  Unless
you're doing mad simulations or calculating pi or searching for aliens
or something.

> Paul
> [1] who apols in advance if someone has already done this or I've missed
> the point; /me might not be following this thread perfectly

Likewise; I'm not sure if this point has been uttered prior in the


More information about the mailing list