From owner-cvs-all Wed Sep 12 6: 0:15 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 3213437B409; Wed, 12 Sep 2001 06:00:06 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id XAA15760; Wed, 12 Sep 2001 23:00:00 +1000 Date: Wed, 12 Sep 2001 22:59:38 +1000 (EST) From: Bruce Evans X-X-Sender: To: Marcel Moolenaar Cc: "Brian F. Feldman" , Mark Murray , Peter Wemm , , Subject: Re: cvs commit: src/sys/kern subr_prf.c src/sys/sys systm.h In-Reply-To: <20010911170706.A22997@kayak.xcllnt.net> Message-ID: <20010912225508.W1472-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 11 Sep 2001, Marcel Moolenaar wrote: > On Wed, Sep 12, 2001 at 12:30:50AM +1000, Bruce Evans wrote: > > Disagreed. This seems like a normal optimization to me. It's like > > replacing strlen("foo") by 3. > > None of the so called optimizations are normal in that normally you > optimize those parts of the program where you have the largest gain > for the least amount of effort. Replacing strlen("foo") by 3 only > marginally makes more sense. In any case, I don't believe that GCC > is at a point where all the big/significant optimizations have been > implemented, so I fail to see how these optimizations make the code > better. I don't see value in the fact that my scientific program may > be twice as slow as the competition, but at least the result is printed > 7 clocks earlier. Right. I didn't say that it was a worthwhile optimization :-). It's just an easy one, and has the advantages of being machine-independent and actually an optimization on all machines (that's for strlen; printf --> putchar might be a pessimization if putchar is poorly implemented). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message