Article View: comp.lang.misc
Article #1857Re: Re: Aggressive optimization
From: David Chase
Date: Tue, 30 Oct 1990 21:22
Date: Tue, 30 Oct 1990 21:22
34 lines
2332 bytes
2332 bytes
diamond@tkou02.enet.dec.com (diamond@tkovoa) writes: >C was invented in order to be that better assembler. If you want machine >level, you're supposed to program in C. That is exactly the purpose for >which C was created. If you want an HLL, use one; don't cripple C. This may be true for (one dialect of) pre-ANSI C, but the specification of ANSI C allows (if you don't say "volatile") a large number of entertaining optimizing transformations, despite assertions by you and other posters here that C is a "low level language" and "low level languages ought not be aggressively optimized". C *is* a low level language, but the optimizations are 100% legal, often tend to make the code go faster, and thus they are applied. The compiler-writer's claim is "I can prove that these optimizations conform to the standard"; can you *prove* that they should not be done? How will it sell more computers/compilers to NOT do the transformations? (Lest you forget, dollars and cents is what it all comes to in the end.) Two things to note: 1) several optimizations could be applied much more frequently to C if it weren't for possible aliasing in procedure pointer/array parameters. If you don't understand what I'm talking about, go read a book on dependence analysis -- Wolfe's _Optimizing Supercompilers ..._ will give you a feel for what can be done to Fortran. 2) it's senseless to argue with the optimizer authors; they'll do everything that time, the standard, and the customers permit. If ANSI has changed Your Favorite Language and you had a substantial investment in software that was harmed by this, take it up with ANSI. You might look into the history of ANSI Cobol. David Chase Sun Microsystems, Inc.
Technical Details
Message-ID:
<1849@exodus.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!rbbb.Eng.Sun.COM!chasedReferences:
<2301@wn1.sci.kun.nl> <8960018@hpfcso.HP.COM> <1990Oct30.105241.9733@tkou02.enet.dec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!rbbb.Eng.Sun.COM!chased From: chased@rbbb.Eng.Sun.COM (David Chase) Newsgroups: comp.lang.misc Subject: Re: Re: Aggressive optimization Summary: Define, please "low level language", and why that should inhibit optimization Message-ID: <1849@exodus.Eng.Sun.COM> Date: 30 Oct 90 21:22:38 GMT References: <2301@wn1.sci.kun.nl> <8960018@hpfcso.HP.COM> <1990Oct30.105241.9733@tkou02.enet.dec.com> Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems, Mt. View, Ca. Lines: 34