peterjeremy at optushome.com.au
Fri May 16 01:48:00 PDT 2003
On Fri, May 16, 2003 at 09:07:32AM +0200, Pawel Jakub Dawidek wrote:
>Look at functions in /sys/kern/kern_tc.c. There are so many little
>functions. How about put __inline here and there?
How about you try this and post some results showing what effect this
has - both at the micro-benchmark level and for a real-world
application (like a proxy or load balancer).
>And second thing. Does anybody think about representing time in BCD code?
This would take a lot of effort: There are no BCD primitives in C so
you would have to start off with a an arithmetic and I/O library.
And, apart from the i386, I don't believe any of the supported CPUs
have BCD support in hardware - and the i386 support is very limited.
Then you'll need a new BCD gettimeofday() syscall and BCD variants of
all the functions in ctime(3).
What format time do you want? Seconds-since-epoch or yyyy/mm/dd
hh:mm:ss? Converting between these formats needs a fair amount of
arithmetic so if you get it wrong, you've probably written off any
At the end, it's not clear what you gain. You still need the ability
to perform arithmetic to convert between UTC and local time. All you've
saved is the binary-to-decimal conversion - which is trivial compared
to all the other overheads.
More information about the freebsd-hackers