From owner-cvs-all@FreeBSD.ORG Wed Jul 23 00:36:03 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E28B037B401; Wed, 23 Jul 2003 00:36:03 -0700 (PDT) Received: from HAL9000.homeunix.com (ip114.bella-vista.sfo.interquest.net [66.199.86.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0510A43F3F; Wed, 23 Jul 2003 00:36:02 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h6N7ZuhC012071; Wed, 23 Jul 2003 00:35:57 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h6N7ZsqL012070; Wed, 23 Jul 2003 00:35:54 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 23 Jul 2003 00:35:54 -0700 From: David Schultz To: Poul-Henning Kamp Message-ID: <20030723073554.GA11876@HAL9000.homeunix.com> Mail-Followup-To: Poul-Henning Kamp , src-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <20030723012048.GB61884@athlon.pn.xcllnt.net> <19767.1058938272@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19767.1058938272@critter.freebsd.dk> cc: src-committers@FreeBSD.ORG 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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 07:36:04 -0000 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.