Date: Mon, 27 Feb 2006 21:53:29 +0530 From: "Joseph Koshy" <joseph.koshy@gmail.com> To: "Vlad GALU" <vladgalu@gmail.com> Cc: freebsd hackers <freebsd-hackers@freebsd.org> Subject: Re: Fastest timecounter ? Message-ID: <84dead720602270823s34c18107te6e45a413dec5da7@mail.gmail.com> In-Reply-To: <79722fad0602270809p2229db83i5cb4cf0b24f91828@mail.gmail.com> References: <79722fad0602270809p2229db83i5cb4cf0b24f91828@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
vg> I wrote a piece of software that has to get the current vg> timestamp, one way or the other, a huge number of times per vg> second. Apart from the empyrical tests one can perform to vg> find out the timekeeping scheme with the less performance vg> impact, is there any rule of thumb as to what choice to go vg> for ? vg> Any kind of advice is most welcome, especially reading vg> material. vg> P.S. I know that some of you may say that calling vg> gettimeofday() that often is braindead, and at some vg> point I agree. Unfortunatley, right now I can't do vg> anything better. I need timekeeping to comb the vg> algorithms that deal with my data structures a bit more, vg> after which I can switch to time-related optimizations. If you just want a relative count (i.e., not absolute time) and if your machine's aren't going to be in sleep modes, you could use the RDTSC instruction directly. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84dead720602270823s34c18107te6e45a413dec5da7>