On Thu, Feb 28, 2013 at 11:25 AM, Alexey Dokuchaev <da...@freebsd.org>wrote:
> On Thu, Feb 28, 2013 at 11:27:02AM +0000, Davide Italiano wrote: > > New Revision: 247460 > > URL: http://svnweb.freebsd.org/changeset/base/247460 > > > > Log: > > MFcalloutng (r247427 by mav): > > We don't need any precision here. Let it be fast and dirty shift then > > slow and excessively precise 64-bit division. > > > > - if (sbt >= 0 && us > sbt / SBT_1US) > > - us = sbt / SBT_1US; > > + if (sbt >= 0 && us > (sbt >> 12)) > > + us = (sbt >> 12); > > Does this really buy us anything? Modern compilers should be smart enough > to > generate correct code. Do you have evidence that this is not the case > here? > Not to mention that it obfuscates the code by using some magic constant. > > ./danfe > SBT_1US is 4294, not 4096 (1 << 12). This is an approximation, which the compiler obviously can't automatically apply. _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"