Date: Mon, 27 Feb 2006 18:09:26 +0200 From: "Vlad GALU" <vladgalu@gmail.com> To: "freebsd hackers" <freebsd-hackers@freebsd.org> Subject: Fastest timecounter ? Message-ID: <79722fad0602270809p2229db83i5cb4cf0b24f91828@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Dear hackers, I'm in a dilemma (more like a trilemma, actually). While following the 5.x and 6.x development cycle I observed that the default timecounter varies from one machine from another (for instance on my home desktop which is an AMD Athlon 2400+ it uses ACPI-fast, whereas on my Centrino-powered lappie it likes TSC better). 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 ? Any kind of advice is most welcome, especially reading material. P.S. I know that some of you may say that calling gettimeofday() that often is braindead, and at some point I agree. Unfortunatley, right now I can't do anything better. I need timekeeping to comb the algorithms that deal with my data structures a bit more, after which I can switch to time-related optimizations. -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79722fad0602270809p2229db83i5cb4cf0b24f91828>