X-Authentication-Warning: sal.physics.ucsb.edu: dwhysong owned process doing -bs Date: Mon, 10 May 1999 10:07:07 -0700 (PDT) From: David Whysong To: pgcc AT delorie DOT com Subject: Re: Optimization question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: pgcc AT delorie DOT com "Bernd Melchers" wrote: > good compilers should optimize such expressions by itself, the method > is called "common subexpression optimization". That's exactly what I thought, but... This morning I've been playing around with assembler dumps. Doing subexpression elimination by hand has reduced the number of fmul instructions considerably (as verified by "grep fmul junk.c | wc"), though for some reason there are a few more fadd instructions. Dave David Whysong dwhysong AT physics DOT ucsb DOT edu Astrophysics graduate student University of California, Santa Barbara My public PGP keys are on my web page - http://www.physics.ucsb.edu/~dwhysong DSS PGP Key 0x903F5BD6 : FE78 91FE 4508 106F 7C88 1706 B792 6995 903F 5BD6 D-H PGP key 0x5DAB0F91 : BC33 0F36 FCCD E72C 441F 663A 72ED 7FB7 5DAB 0F91