Change default VFS timestamp precision?
John Baldwin
jhb at freebsd.org
Fri Dec 19 17:28:10 UTC 2014
On Thursday, December 18, 2014 08:14:02 PM Poul-Henning Kamp wrote:
> --------
>
> In message <77322.1418933100 at 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
More information about the freebsd-arch
mailing list