Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2006 16:15:15 +0000
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Vlad GALU <vladgalu@gmail.com>
Cc:        freebsd hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Fastest timecounter ?
Message-ID:  <20060228161515.GA44849@jbell.maths.tcd.ie>
In-Reply-To: <79722fad0602270809p2229db83i5cb4cf0b24f91828@mail.gmail.com>
References:  <79722fad0602270809p2229db83i5cb4cf0b24f91828@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 27, 2006 at 06:09:26PM +0200, Vlad GALU wrote:
>          I wrote a piece of software that has to get the current
> timestamp, one way or the other, a huge number of times per second.
> Apart from the empyrical tests one can perform to find out the
> timekeeping scheme with the less performance impact, is there any rule
> of thumb as to what choice to go for ?

The TSC is always fastest, but unfortunately under some circumstances
it can't be trusted (if your CPU has throttle modes to save power
or on some SMP systems where the two TSCs in each CPU give different
values).

	David.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060228161515.GA44849>