Date: Fri, 19 Dec 2014 10:28:02 -0500 From: John Baldwin <jhb@freebsd.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: "freebsd-arch@freebsd.org" <arch@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, Jilles Tjoelker <jilles@stack.nl> Subject: Re: Change default VFS timestamp precision? Message-ID: <7567696.mqJ3jgzJgL@ralph.baldwin.cx> In-Reply-To: <77371.1418933642@critter.freebsd.dk> References: <201412161348.41219.jhb@freebsd.org> <77322.1418933100@critter.freebsd.dk> <77371.1418933642@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, December 18, 2014 08:14:02 PM Poul-Henning Kamp wrote: > -------- > > In message <77322.1418933100@critter.freebsd.dk>, "Poul-Henning Kamp" writes: > >>I don't understand > >>why you think TSP_USEC is slower than TSP_NSEC. microtime() and > >>nanotime() > >>both just call bintime() and then convert the result using similar math. > > > >Because of the pointless nano->micro conversion which makes TSP_USEC > >take a division longer to deliver a less precise result than TSP_NSEC. > > Actually, that's the other way around: it converts microseconds to > nanoseconds with a pointless multiplication. Yes, and multiplication is cheaper than division. It's not a power of two (so more than a single bitshift), but possibly in the noise compared to the work in bintime() itself. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7567696.mqJ3jgzJgL>