From owner-cvs-all@FreeBSD.ORG Tue Jul 22 18:20:54 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 6AB2237B401; Tue, 22 Jul 2003 18:20:54 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F3EF43F3F; Tue, 22 Jul 2003 18:20:53 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h6N1KowO016726; Tue, 22 Jul 2003 18:20:50 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h6N1Knw9061945; Tue, 22 Jul 2003 18:20:49 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h6N1KmiL061944; Tue, 22 Jul 2003 18:20:48 -0700 (PDT) (envelope-from marcel) Date: Tue, 22 Jul 2003 18:20:48 -0700 From: Marcel Moolenaar To: Poul-Henning Kamp Message-ID: <20030723012048.GB61884@athlon.pn.xcllnt.net> References: <20030722233923.GD61493@athlon.pn.xcllnt.net> <16721.1058917746@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16721.1058917746@critter.freebsd.dk> User-Agent: Mutt/1.5.4i cc: "Alan L. Cox" cc: src-committers@FreeBSD.org cc: Bosko Milekic cc: Bruce Evans cc: cvs-src@FreeBSD.org cc: Steve Kargl 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 01:20:54 -0000 On Wed, Jul 23, 2003 at 01:49:06AM +0200, Poul-Henning Kamp wrote: > >> >On Wed, Jul 23, 2003 at 12:56:34AM +0200, Poul-Henning Kamp wrote: > >> >> > >> >> And the only two criteria I think are trivial to use for proving an > >> >> actual benefit is: > >> >> 1. less code is generated. > >> >> 2. it runs faster in tests. > >> > > >> >criterium 1 is the worst possible. Only criterium 2 makes sense. > >> > >> No, if inlining a functions results in less code overall it also, > >> ipso facto results in faster execution. > > > >Proof it. I can give a counter example to show that I seriously > >doubt this statement: > > > >Inlining a function that has only 1 caller, and the call is on > >a cold path (ie a nested if or else that's almost never executed) > > Why on earth would you even think about inlining in that case ? That's not the point. You make unqualified general statements that smaller code yields faster execution (ipso facto). I give one (trivial) counter example to illustrate where your claim does not trivially hold and ask for proof. Give me the proof or stop spreading FUD. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net