Date: Thu, 27 Oct 2005 12:24:30 +0400 From: "Yuriy N. Shkandybin" <jura@networks.ru> To: "David Xu" <davidxu@freebsd.org> Cc: current@freebsd.org Subject: Re: MySQL Performance 6.0rc1 Message-ID: <00a801c5dacf$db3b7700$6504010a@Jura> References: <21137.1130401220@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
>>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00a801c5dacf$db3b7700$6504010a>
