Date: Wed, 23 Jul 2003 00:35:54 -0700 From: David Schultz <das@FreeBSD.ORG> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern init_main.c kern_malloc.c md5c.c subr_autoconf.c subr_mbuf.c subr_prf.c tty_subr.c vfs_cluster.c vfs_subr.c Message-ID: <20030723073554.GA11876@HAL9000.homeunix.com> In-Reply-To: <19767.1058938272@critter.freebsd.dk> References: <20030723012048.GB61884@athlon.pn.xcllnt.net> <19767.1058938272@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 23, 2003, Poul-Henning Kamp wrote: > The algorithm I would like to see implemented as a pre-commit check > for the __inline* keywords are: > > > [1] if (programmer thinks inline might be useful) { > try compiling with inline; > [2] if (object code smaller) { > /* inline is beneficial */ > commit it; > return; > } > run benchmark; > [3] if (code runs faster) { > /* inline is beneficial */ > commit it; > return; > } > } > /* inline not proven beneficial */ > return; I agree with your algorithm, as long as you're not going to beat people over the head with it for every inline function until they submit benchmarks. Your cavalier attitude towards all this bothers me. You presume the right to make gratuitous changes to other people's code unless they prove to your satisfaction that they were right in the first place. If you're going to go around and remove some inlines, that's great; many of them are probably inappropriate. But be prepared to justify the changes if someone---particularly the maintainer---objects. ``It makes the object code bigger'' is not justification in itself.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030723073554.GA11876>