From owner-cvs-all@FreeBSD.ORG Wed Jul 23 00:54:01 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 C00B837B401; Wed, 23 Jul 2003 00:54:01 -0700 (PDT) Received: from phk.freebsd.dk (phk.freebsd.dk [212.242.86.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 795C343FB1; Wed, 23 Jul 2003 00:53:59 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by phk.freebsd.dk (8.12.8/8.12.8) with ESMTP id h6N7rvV3038844; Wed, 23 Jul 2003 07:53:57 GMT (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h6N7rv5H020847; Wed, 23 Jul 2003 09:53:57 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Mark Murray From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 23 Jul 2003 08:49:15 BST." <200307230749.h6N7nFZ2071337@grimreaper.grondar.org> Date: Wed, 23 Jul 2003 09:53:57 +0200 Message-ID: <20846.1058946837@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:54:02 -0000 In message <200307230749.h6N7nFZ2071337@grimreaper.grondar.org>, Mark Murray wr ites: >Hi > >There is a problem with your algorithm. > >M > >"Poul-Henning Kamp" writes: >> 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 */ > >The executable could be too slow here. This forces "small code" >to be always better, at the potential expense of speed. Fine fine fine! It was meant to make it easier for people to justify inlines, but if you don't like it we'll stick with only the hard way: Nothing should be inlined unless it has a demonstrated, measurable positive effect. Or put even more bluntly: Don't add inlines you haven't benchmarked. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.