Re: MySQL Performance 6.0rc1

From: Yuriy N. Shkandybin (jura_at_networks.ru)
Date: 10/27/05

  • Next message: David Xu: "Re: MySQL Performance 6.0rc1"
    To: "David Xu" <davidxu@freebsd.org>
    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

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: David Xu: "Re: MySQL Performance 6.0rc1"