Proebsting's Law

Simon Wistow simon at thegestalt.org
Wed Dec 14 10:40:13 GMT 2005


On Tue, Dec 13, 2005 at 11:32:19PM +0000, James Davis said:
> Is this meant to be a troll by Proebsting? I apologise for falling for
> it if it is, but I've not seen such a badly written argument for a while :-)

I think it's meant to be thought provoking and rather light hearted, and 
I posted it for the final line but, as I'm bored I shall endeavour to 
answer.
 
> False, even with optimizations disabled I'm sure that modern compilers
> don't suddenly turn into the compiler technology of 35 years ago if only
> because languages and target architectures have changed.

Really? Is that such a bad guesstimate? After all a naive compiler chain
- simply tokenise, parse, generate an AST and then generate native code
- is basically what gcc with no optimisations does. At best case
scenario gcc is going to have a couple of optimsations anyway so will 
actually be in *favour* of the compiler. 



> > Let's assume that this ratio is about 4X for typical 
> > real-world applications
> 
> A figure pulled from a hat?


I believ he compiled a test suite with no optimsations and then -O3 


> > and let's further assume that compiler 
> > optimization work has been going on for about 36 years. 
> 
> Again, pulled from a hat?

The first Cobol compilers came about in 1959 I believe. 

	http://www.computerhistory.org/events/lectures/cobol_06121997/

but let's assume that they go back even further. Isn't he strengthening 
his case even further.



> 
> > These 
> > assumptions lead to the conclusion that compiler optimization advances 
> > double computing power every 18 years. QED.
> 
> Given two figures I've shown no basis for I'm claiming something.

Right. So, even though he's being generous and assuming that, say, GCC 
(which is a pretty slow compiler) with no optimisations is as slow as a 
naive compiler from the first beginnings of compiler design (which it's 
probably not) and though he's saying compiler design began 36 years ago 
(when in fact it was probably slightly longer than that) he's still 
wrong?


> Isn't this is Amdahl's Law (or is at least a corollary to it)?. It does
> also ignore some interesting points.
> 
> - If your program runs for 101 minutes and you've rented 100 minutes of
> time on a shared computing resource 4% optimization is very important to
> you.

Sure. And I recently spent some time seeing whether


	if (a==b)
		c++
or

	c += (a==b)

was faster on deeply pipelined processors. My housemate is on the 
optimisation and performance team at a large spread betting company. 

However, most of the time optimisation comes from improved algorithms 
and more agressive caching. 

My, and here I slip into marketing speak, take how message from that 
page was that compiler optimisation is useful in the same way that 
spending 200 quid modding your car to get 1 exta Bhp is. Sure, for some 
people it's worth it but for 99% of people it

a) doesn't matter
b) there are easier ways of getting better performance


Simon




More information about the london.pm mailing list