From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32898cca6ca4143e X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Compiler Optimisation? Date: 1998/12/07 Message-ID: <366C20DC.2510FCC2@pwfl.com>#1/1 X-Deja-AN: 419714236 Content-Transfer-Encoding: 7bit Sender: condicma@nameserver.pwfl.com References: <98-12-010@comp.compilers> Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada Date: 1998-12-07T00:00:00+00:00 List-Id: Iain Bate wrote: > > I am looking for some specific information on compiler optimisation > and I was wondering if anyone could help. Basically, I would like to > get some idea how much faster code executes due to optimisation. I am > looking for the information at two levels: > > 1. How much faster code executes due to the overall optimisation > process? > 2. How much faster code executes due to specific optimisation stages, > e.g. the speed-up due to the peephole stage? > If you get an answer to this, it is almost certainly going to be compiler dependent and probably misleading. Consider that if a compiler generates really crappy code in non-optimized mode, the optimization could show a huge delta in performance. Whereas another compiler may generate very tight code in non-optimized mode and hence get a much smaller delta in optimization. So almost any quote you get ("Our optimizer results in 50% improvement in performance! - by taking out all the no-ops we stuck in there in the code generation...") is bound to be misleading. Your best bet is to get a representative sample of code for your particular applications and run some timing studies comparing one compiler to another at wound-full-out optimization. Almost anything else is not going to provide you with much useful information. MDC -- Marin D. Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 Ph: 561.796.8997 Fx: 561.796.4669 "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." -- G.B. Shaw