Optimizations.
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri May 16 00:59:55 PDT 2003
In message <20030516070732.GT45118 at garage.freebsd.pl>, Pawel Jakub Dawidek writ
es:
>On Thu, May 15, 2003 at 11:14:43PM -0700, Terry Lambert wrote:
>+> What about "gettimeofday()"? There are a number of applications,
>+> particularly HTTP protocol applications, with strict timestamp
>+> logging requirements, mandated by standards. The tend to call
>+> gettimeofday() up to six times per transaction. Examples will
>+> include HTTP proxies, L7 load balancers, and proxy caches. Any
>+> box competing in the Cisco CSS/F5 falls into this category.
Terry, you should have your own late-night chat show.
That way you could be funny for the people who have nothing else
to do than watch late-night television showing ill informed people
trying to be funny without knowing what they talk about.
More importantly, it would remove you from where I have to listen
to your silly drivel.
Even a cursory glance at our source code, something I am of course
fully aware that you are not guilty off, would teach you a few
interesting facts, something I'm equally aware that you have
successfully resisted for the last 10 years.
But for the benefit of the remainder of hackers@:
gettimeofday() is the least of apaches problems: It is already
a totally lockless systemcall.
>That's right:)
>Look at functions in /sys/kern/kern_tc.c. There are so many little
>functions. How about put __inline here and there?
Try it, and you'll find that things get slower because the code
gets bigger.
>And second thing. Does anybody think about representing time in BCD code?
Yes, I remember when we did things like that, on computers which
operated naturally on BCD fields, and therefore tended to have a
chance of calculating delta-times in finite times.
Modern computers however, are binary.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-hackers
mailing list