Re: MySQL Performance 6.0rc1

From: Yuriy N. Shkandybin <jura_at_networks.ru>
Date: Thu, 27 Oct 2005 12:24:30 +0400
>>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
Received on Thu Oct 27 2005 - 06:26:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:46 UTC