* Re: compile bug in gcc ? - was performance ... [not found] <m0uTaxK-0001pVC@atheist.tamu.edu> @ 1996-06-12 19:45 ` Wim van Dorst 1996-06-13 21:54 ` performance Berndt Josef Wulf 0 siblings, 1 reply; 3+ messages in thread From: Wim van Dorst @ 1996-06-12 19:45 UTC (permalink / raw) Hello *, Richard Henderson wrote: } That said, here are the numbers for my eb164/300 with gcc -O2: } test1: } 1000 10 0.49 163.84 } test2: } Transf Benchmark: loop length : 10 * 10^3 } Transf Benchmark: Time/MegaFlops: 1.43 126.25 } test3: } Size Loops Time MFlops } 500 40000 2.50 80.00 } 1000 20000 2.49 80.31 } 5000 4000 2.61 76.70 } 10000 2000 4.36 45.92 } 50000 400 2.88 69.42 } 100000 200 4.79 41.71 } 500000 40 3.35 59.71 I am always keen to see how my PC, a 21066A/233 NoName, performs in comparison with others. I took the programs as posted by Arno Paehler, and compiled them with 'gcc -O3' All three compiled problemless (warnings in test3, though), and all three ran ok: Test1: 1000 1 0.13 61.54 Test2: Transf Benchmark: loop length : 10 * 10^3 Transf Benchmark: Time/MegaFlops: 2.85 63.16 Test3 1 25: Size Loops Time MFlops 500 4000 0.54 37.04 1000 2000 0.56 35.71 5000 400 2.80 7.14 10000 200 2.95 6.78 50000 40 3.17 6.31 100000 20 3.18 6.29 500000 4 3.26 6.13 I didn't exactly study on the precise meaning of these results, but do I gather that my machine is about half or one third of a 21164/300? Good :-). Met vriendelijke groeten, Wim van Dorst -------------------------------------------------------------------- Blue Baron = Wim van Dorst, Voice (+31) 33 4676365, (+31) 35 5242319 (-: baron@clifton.hobby.nl WvD@Chem.AkzoNobel.nl :-) -------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: performance 1996-06-12 19:45 ` compile bug in gcc ? - was performance Wim van Dorst @ 1996-06-13 21:54 ` Berndt Josef Wulf 0 siblings, 0 replies; 3+ messages in thread From: Berndt Josef Wulf @ 1996-06-13 21:54 UTC (permalink / raw) > > Hello *, > > Richard Henderson wrote: > } That said, here are the numbers for my eb164/300 with gcc -O2: > } test1: > } 1000 10 0.49 163.84 > } test2: > } Transf Benchmark: loop length : 10 * 10^3 > } Transf Benchmark: Time/MegaFlops: 1.43 126.25 > } test3: > } Size Loops Time MFlops > } 500 40000 2.50 80.00 > } 1000 20000 2.49 80.31 > } 5000 4000 2.61 76.70 > } 10000 2000 4.36 45.92 > } 50000 400 2.88 69.42 > } 100000 200 4.79 41.71 > } 500000 40 3.35 59.71 > Which program is this and where can I find the source code for it? cheerio Berndt -- Name : Berndt Josef Wulf E-Mail : wulf@hotdog.apana.org.au Sysinfo : DEC AXPpci33+, NetBSD-1.2Alpha ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <199606111618.BAA24680@atlas.rc.m-kagaku.co.jp>]
* Re: compile bug in gcc ? - was performance ... [not found] <199606111618.BAA24680@atlas.rc.m-kagaku.co.jp> @ 1996-06-11 21:26 ` Richard Henderson 0 siblings, 0 replies; 3+ messages in thread From: Richard Henderson @ 1996-06-11 21:26 UTC (permalink / raw) > Test 2 is the one that would not finish on a 21164-300 under linux. This one, it turns out, is programmer error. > /* This is Test2 */ ... > void > main (int argc, char *argv[]) > { > float f1, t1; > long i, n; ... > if (argc == 1) > n=10; > else > sscanf (argv[1], "%d", &n); sscanf is writing an int into a long so the upper 32 bits are not zeroed. The number I happened to see in n was on the order of 10**12. gcc -Wall can catch many of these problems, as will using the correct system header files. Some other pointers: 1) You should be using CLOCKS_PER_SEC in time.h. Additionally, user programs should not prototype library functions. You will be wrong on some system. Besides, that is what system header files are for. So your cpu-time poll routines should be float second() { return (float)clock() / CLOCKS_PER_SEC; } 2) If you use malloc and free, include stdlib.h. If you don't, by ANSI C rules, malloc is implicitly declared to return an int which gets truncated when you cast to a pointer. 3) This, unlike the last, is merely a helpful tip for the alpha not an error on your part. > extern void dist (float *, float *, float *, int); ... > for (i = 0; i < lx; i++) > for (j = 0; j < 3 * NM; j += 3) > dist (u, v + j, d, NM); Alpha calling conventions let us do things more efficiently when we know that the called function is in the same object file. Making dist() static rather than extern has this effect. This should be especially helpful when the functions are at the center of multiply nested loops. That said, here are the numbers for my eb164/300 with gcc -O2: test1: 1000 10 0.49 163.84 test2: Transf Benchmark: loop length : 10 * 10^3 Transf Benchmark: Time/MegaFlops: 1.43 126.25 test3: Size Loops Time MFlops 500 40000 2.50 80.00 1000 20000 2.49 80.31 5000 4000 2.61 76.70 10000 2000 4.36 45.92 50000 400 2.88 69.42 100000 200 4.79 41.71 500000 40 3.35 59.71 r~ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-06-13 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <m0uTaxK-0001pVC@atheist.tamu.edu>
1996-06-12 19:45 ` compile bug in gcc ? - was performance Wim van Dorst
1996-06-13 21:54 ` performance Berndt Josef Wulf
[not found] <199606111618.BAA24680@atlas.rc.m-kagaku.co.jp>
1996-06-11 21:26 ` compile bug in gcc ? - was performance Richard Henderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox