Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trying to find right list




On Thursday, November 18, 2004, at 03:46 PM, Matt Watson wrote:

Even better would be a "recipe" to reproduce. Something like:

static const char _lowerhexstr[] = "0123456789abcdef0x";

int
main(void) {

    struct  timeval mytimeval;
    char   *result;
    int     i;

    gettimeofday(&mytimeval, NULL);
    result = ctime((const time_t *)&mytimeval.tv_sec);
    printf("%s", result);				

    {
    char    buffer[64];
    for (i = 0; i < (1<<27); i++) {

char *strBuf = buffer, *strPtr;
unsigned long val_ul;
strPtr = &strBuf[64];
val_ul = -999999;
// do *--strPtr = _lowerhexstr[(val_ul & 7)]; while ((val_ul >>= 3));
do *--strPtr = ((val_ul & 7) + 48); while ((val_ul >>= 3));
}
}


    gettimeofday(&mytimeval, NULL);
    result = ctime((const time_t *)&mytimeval.tv_sec);
    printf("%s", result);				

    return 0;
}

Test 400Mhz G3 vs 400Mhz G4  with GCC 3.3 XCode and indexed run identical
but value assign runs slower on G4 than indexing and
value assign runs faster on G3 than indexing

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.