MySQL Performance 6.0rc1
Yuriy N. Shkandybin
jura at networks.ru
Thu Oct 27 01:26:32 PDT 2005
>>Check gettimeofday syscall, it follows every I/O syscall, I think
>>our gettimeofday is tooooooo expensive, if we can directly get time from
>>memory, the performance will be improved further.
It's true:
run next on same PC от freebsd and linux and compare
struct timeval start;
struct timeval stop;
struct timeval tmp;
register unsigned i;
unsigned difft;
gettimeofday(&start, NULL);
for(i=0;i<1000000; i++) {
gettimeofday(&tmp, NULL);
}
gettimeofday(&stop, NULL);
difft= (unsigned) ( (stop.tv_sec - start.tv_sec)*1000000 + (stop.tv_usec -
start.tv_usec));
printf("%u\n", difft);
Jura
More information about the freebsd-current
mailing list