site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Nov 16, 2004, at 5:46 AM, Steven J Abner wrote: On Tuesday, November 16, 2004, at 01:38 AM, Matt Watson wrote: Thanks for making me think!!! I found the problem. The compiler. times: first code / second code 110 / 55 Now who should get this this affects systems 10.1.5 - 10.3.6? Do you need a code snippet? Even better would be a "recipe" to reproduce. Something like: 1) Install 10.1.5 on a 400MHz PowerMac G3 2) Install the 10.1.5 developer tools (December 2002) 3) Compile the following program with cc -Os -o foo foo.c: #include <stdio.h> int main(void) { printf("Hello, World!\n"); return 0; } 4) Run the program with /usr/bin/time ./foo Something like that... _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com Can you rephrase the question? If you post a compilable, self-contained program that exhibits the issue you're trying to illustrate, it would be easier to respond. A good problem report will include: On a PPC two different machines and OS(s) using GCC 2.95.2 NOT 3.3 the code: "do *--strPtr = ((val_ul & 7) + 48); while ((val_ul >>= 3));" runs twice as slow as "do *--strPtr = _lowerhexstr[(val_ul & 7)]; while ((val_ul >>= 3));" Yes. In addition, the answers to the below questions would be very useful: 1) OS versions being used/compared (uname -a will tell you this) 2) Compiler versions being used/compared (cc -v will tell you this) 3) Machine configurations being used/compared (/usr/sbin/system_profiler SPHardwareDataType will tell you this) 4) Self-contained compilable code example (a single .c file with main()) 5) The compiler invocation being used (cc -Os -mdynamic-no-pic -prebind -o foo foo.c) 6) What you observed/expected ("took 125 seconds on 400MHz G4, took 99 seconds on 300MHz G3. I would have expected the G4 to be faster...") For your case, it's not clear how to measure the timing you're seeing, since we don't have a self-contained example. matt. smime.p7s
participants (1)
-
Matt Watson