Date: Sat, 19 May 2007 00:11:21 +1000 (EST) From: Bruce Evans <bde@optusnet.com.au> To: Dmitry Marakasov <amdmi3@amdmi3.ru> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Peter Wemm <peter@freebsd.org> Subject: Re: cvs commit: src/sys/kern vfs_vnops.c Message-ID: <20070519000550.I42876@delplex.bde.org> In-Reply-To: <20070518095300.GA1288@hades.panopticon> References: <200705171531.l4HFVEdX083991@repoman.freebsd.org> <20070518025640.Q39238@delplex.bde.org> <20070518095300.GA1288@hades.panopticon>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070519000550.I42876>