Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2001 22:59:38 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        "Brian F. Feldman" <green@FreeBSD.org>, Mark Murray <mark@grondar.za>, Peter Wemm <peter@FreeBSD.org>, <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:  <20010912225508.W1472-100000@delplex.bde.org>
In-Reply-To: <20010911170706.A22997@kayak.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010912225508.W1472-100000>