From owner-cvs-all@FreeBSD.ORG Fri May 18 14:11:32 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EDC016A402; Fri, 18 May 2007 14:11:32 +0000 (UTC) (envelope-from bde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id E558113C43E; Fri, 18 May 2007 14:11:31 +0000 (UTC) (envelope-from bde@optusnet.com.au) Received: from c211-30-216-190.carlnfd3.nsw.optusnet.com.au (c211-30-216-190.carlnfd3.nsw.optusnet.com.au [211.30.216.190]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l4IEBKwS018503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 19 May 2007 00:11:23 +1000 Date: Sat, 19 May 2007 00:11:21 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Dmitry Marakasov In-Reply-To: <20070518095300.GA1288@hades.panopticon> Message-ID: <20070519000550.I42876@delplex.bde.org> References: <200705171531.l4HFVEdX083991@repoman.freebsd.org> <20070518025640.Q39238@delplex.bde.org> <20070518095300.GA1288@hades.panopticon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Peter Wemm Subject: Re: cvs commit: src/sys/kern vfs_vnops.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 18 May 2007 14:11:32 -0000 On Fri, 18 May 2007, Dmitry Marakasov wrote: > * Bruce Evans (bde@optusnet.com.au) wrote: >>> peter 2007-05-17 15:31:14 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/kern vfs_vnops.c >>> Log: >>> Eliminate a micro-optimization that hasn't had any effect for 15+ years. >>> >>> Revision Changes Path >>> 1.249 +0 -5 src/sys/kern/vfs_vnops.c >> Since it was only implemented 11.5 years ago (in rev.1.18), it certainly >> had no effect 15+ years ago, but it probably had an effect later than 11.5 >> years ago. > I think it refers more to gcc capability to compile var/CONST expression > where CONST is 2^n into bit shift instruction instead of division. Which > is more important, has this capability been confirmed? gcc did this 15+ years ago, except probably for 64-bit types (IIRC, gcc didn't support 64-bit types on 32-bit machines 15+ years ago). The micro-optimization was for a 64-bit type. gcc apparently started optimizing the 64 on 32--bit case some time in the last 11.5 years. I only checked that the gcc in -current did this. I didn't do the binary search to find exactly when gcc started doing this. Bruce