From owner-cvs-all Tue Sep 11 17: 7:30 2001 Delivered-To: cvs-all@freebsd.org Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by hub.freebsd.org (Postfix) with ESMTP id CB52D37B40E; Tue, 11 Sep 2001 17:07:21 -0700 (PDT) Received: (from marcel@localhost) by kayak.xcllnt.net (8.11.4/8.11.4) id f8C077823147; Tue, 11 Sep 2001 17:07:07 -0700 (PDT) (envelope-from marcel) Date: Tue, 11 Sep 2001 17:07:06 -0700 From: Marcel Moolenaar To: Bruce Evans Cc: "Brian F. Feldman" , Mark Murray , Peter Wemm , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_prf.c src/sys/sys systm.h Message-ID: <20010911170706.A22997@kayak.xcllnt.net> References: <200109101458.f8AEwQI98441@green.bikeshed.org> <20010912002041.J5036-100000@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010912002041.J5036-100000@delplex.bde.org> User-Agent: Mutt/1.3.22.1i 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 Wed, Sep 12, 2001 at 12:30:50AM +1000, Bruce Evans wrote: > On Mon, 10 Sep 2001, Brian F. Feldman wrote: > > > Mark Murray wrote: > > > > This hack brought to you by some questionable ``optimizations'' in gcc-3. > > > > gcc-3 takes it apon itself to convert: > > > > printf("string\n") -> puts("string"); > > > > and: > > > > printf("a"); -> putchar('a') > > > > etc. I dont know what they've been smoking over there in gcc-land, but > > > > it must be pretty good stuff. > > > > > 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. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message