home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os9 / 1445 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  15.1 KB

  1. Path: sparky!uunet!know!cass.ma02.bull.com!think.com!ames!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!chx400!bernina!stp
  2. From: stp@bernina.ethz.ch (Stephan Paschedag)
  3. Newsgroups: comp.os.os9
  4. Subject: Ultra C test results (2nd edition)
  5. Message-ID: <1992Nov22.182117.5350@bernina.ethz.ch>
  6. Date: 22 Nov 92 18:21:17 GMT
  7. References: <2002@mwca.UUCP> <1761@prlhp1.prl.philips.co.uk>
  8. Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
  9. Lines: 334
  10.  
  11. Hi !
  12.  
  13. From the answers I got to my first posting about comparision of the available
  14. C compilers for OS-9/68k I've extended my tests. I've compiled the same
  15. programs with new options (sieve, dhrystone, whetstone) and I've added some
  16. new tests (espresso, primes which is another version of the sieve benchmark).
  17.  
  18.   - why is sieve slower when compiled for a 68020 ?
  19.     this seems to happen on a 68030, but not on a 68040.
  20.  
  21.   - rayshade could not be compiled with Ultra C because the compiler
  22.     generated invalid assembly source ('fadd.l a0,fp0'). This bug could
  23.     be avoided with -O0, but then the program didn't work anymore !
  24.  
  25.   - Ultra C does not have special math support for the 68040. A system-
  26.     state traphandler has to be used for 68881/2 emulation, which is VERY
  27.     slow. This is the reason why the whetstone benchmark is 10 times faster
  28.     on a 68040 when compiled with gcc (gcc has a special math library for
  29.     the 68040 chip).
  30.  
  31.   - when dhry V2.0 was compiled using -j (icode linking) the executable didn't
  32.     work anymore (Error #000:102, Bus Error).
  33.     I couln't reproduce this error, maybe the next problem explains this.
  34.  
  35.   - compiling dhrystone V2.0 with '-tp020 -O7 -r -t100 -s0 -j' failed :
  36.     "be68020: **** internal error - sym not found ****".
  37.     The same happened for compress with '-O7 -tp020 -t5 -j'.
  38.     It seems that this is caused by a combination of the '-j' and '-t' switches
  39.  
  40.   - compiling espresso with Ultra C and the -j option didn't work. The backend
  41.     either terminated with BusError (NULL pointer access) or with an error
  42.     "I-code buffer exhausted". It didn't help to use the -b option. I think
  43.     that it depends on the memory contents at startup of be68k/be68020 how it
  44.     terminates.
  45.  
  46.   - when I tried to compile the modules of espresso with -t5 iopt crashed on
  47.     2 files. For one I got a strange error message :
  48.     "read error at -1308643328 in file ucc0800.i"
  49.     When I tried to compile the second module iopt did hang (I've waited
  50.     30 minutes before I interrupted it)
  51.  
  52.   - for espresso Ultra C generates the slowest code of all three compilers.
  53.     all tries to generate faster code failed (see above)
  54.  
  55.   - the dhrystone benchmark seems to be the only one that runs faster when
  56.     compiled with Ultra C, for all others gcc (in some cases also cc) seems
  57.     to generate faster code. I'm wondering if Microware has optimized their
  58.     compiler for this benchmark ?
  59.  
  60.   - where can I find a documentation about the parameters to the -s and -t
  61.     options. compilations using '-t100 -s0' take MUCH longer than compilations
  62.     using '-t5'; why ?
  63.  
  64.   - whet could not be compiled with 'cc -O=2', c68/c68020 always crashed with
  65.     "**** reg free ****". When compiled with 'cc -O=2 -k2f" c68020 terminated
  66.     with "**** Stack Overflow ****"
  67.  
  68.   - compiling lharc with Ultra C failed because iopt crashed (BusError).
  69.  
  70.   - I've not succeeded compiling the jpeg image compression package due to
  71.     some very strange errors from cfe. The preprocesses sources looked like
  72.     this :
  73.  
  74.        static void
  75.        select_file_type (compress_info_ptr cinfo)
  76.  
  77.     and I got the following error message :
  78.  
  79.        "jcmain.c", line 95: **** ) expected ****
  80.         voidselect_file_type (compress_info_ptr cinfo)
  81.                                                  ^
  82.  
  83.     I'm wondering if a space characted got lost between 'void' and 'select_...'
  84.     If you replace 'compress_info_ptr', which is a typedef', by a simple type,
  85.     the compilation doesn't fail.
  86.  
  87.   - the new linker l68 (Ed 83) supplied with the Ultra C package also seems
  88.     to have bugs. I got strange errors all similar to this :
  89.  
  90.     l68: error - symbol name '_jmptbl', defined by psect 'cstart_a',
  91.         file '/dd/lib/cstart.r' already defined by psect 'cstart_a',
  92.         file '/dd/lib/cstart.r'
  93.  
  94.   - the new r68 (Ed 128) fails to translate correctly 'movem (a7)+,#$1234'
  95.  
  96.   - xengine could only be compiled when an extra math.l was added to the list of
  97.     libraries because l68 complained about too long offsets in netdb.l.
  98.     It seems that this happened because the new libraries for Ultra C are much 
  99.     bigger than the old ones.
  100.  
  101.   - xengine shows once more how important it is to have FAST math support for
  102.     the 68040 chip (gcc '-m68040' is much faster than 'gcc -m68020 -m68881'
  103.     or 'ucc -tp020')
  104.  
  105.   - why is compress so much slower when compiled with Ultra C ??
  106.  
  107.  
  108. Result : gcc still generates faster and more compact code than Ultra C.
  109.          Ultra C is a step into the right direction, but still needs many
  110.          improvements. It seems that some parts of the Ultra C system are
  111.          still quite buggy (did Microware give it to beta testers ??)
  112.  
  113. If there is somebody who gets different results, please let me know. If there
  114. are options for Ultra C that force it to generate faster code, please tell me !
  115.  
  116.  
  117. Stephan
  118.  
  119. ------------------------------------------------------------------------------
  120. Program   : sieve  (source : 2058 bytes, 135 lines)
  121. Machine   : MVME147S-1 (68030 25MHz, 1 User, no other active processes)
  122. Date      : 92/10/06
  123. Compilers : ucc V1.0, gcc V1.42, cc V3.2
  124.  
  125. compiler/options                         comp time   exec time     size
  126. ====================================== ============ =========== ==========
  127.  
  128. ucc -O7                                      31        3.94        25130
  129. ucc -O7 -j                                  392        3.94        24266
  130. ucc -O0                                      18        7.73        25314
  131. ucc -tp020 -O7                               29        4.25        23510
  132. ucc -tp020 -O7 -j                           389        4.24        23190
  133. ucc -tp020 -O0                               17        7.73        23706
  134. ucc -tp020c -O7                              30        4.25        23462
  135.  
  136. gcc -O                                       17        3.73        18850
  137. gcc -O -ob                                   17        3.70        18806
  138. gcc                                          13        5.93        19266
  139. gcc -O -mc68020                              17        3.73        23030
  140. gcc -O -ob -mc68020                          17        3.69        22986
  141. gcc -mc68020                                 13        5.93        23446
  142.  
  143. cc -O=2                                      11        4.82        18732
  144. cc -O                                        10        4.86        18776
  145. cc -O=2 -k2wcw                               12        4.82        22960
  146. cc -O -k2wcw                                 10        4.86        23004
  147.  
  148. ------------------------------------------------------------------------------
  149.  
  150. Program   : sieve  (source : 2058 bytes, 135 lines)
  151. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  152. Date      : 92/11/22
  153. Compilers : ucc V1.0, gcc V1.42, cc V3.2
  154.  
  155. compiler/options                         comp time   exec time     size
  156. ====================================== ============ =========== ==========
  157.  
  158. ucc -O7                                       7        1.49        25418
  159. ucc -O7 -j                                   78        1.48        24786
  160. ucc -O0                                       5        2.24        25602
  161. ucc -tp020 -O7                                7        1.46        23810
  162. ucc -tp020 -O7 -j                            77        1.44        23586
  163. ucc -tp020 -O0                                5        2.25        24006
  164. ucc -tp020c -O7                               7        1.45        23762
  165. ucc -tp020 -O7 -t5                            7        1.43        23810
  166. ucc -tp020 -O7 -t100                         10        1.46        24550
  167. ucc -tp020 -O7 -t100 -s0
  168.  
  169. gcc -O                                        3        1.22        18854
  170. gcc -O -ob                                    4        1.16        18810
  171. gcc                                           3        2.04        19270
  172. gcc -O -mc68020                               4        1.23        23034
  173. gcc -O -ob -mc68020                           4        1.16        22990
  174. gcc -mc68020                                  3        2.05        23450
  175.  
  176. cc -O=2                                       3        1.41        18736
  177. cc -O                                         2        1.49        18780
  178. cc -O=2 -k2wcw                                3        1.41        22964
  179. cc -O -k2wcw                                  3        1.49        22990
  180.  
  181. ------------------------------------------------------------------------------
  182.  
  183. Program   : dhry V1.0
  184. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  185. Date      : 92/11/08
  186. Compilers : ucc V1.0, gcc V1.42, cc V3.2
  187.  
  188. compiler/options                        dhry/sec      size
  189. ====================================== =========== ==========
  190.  
  191. ucc -tp68k -O7                            15663      22926
  192. ucc -tp68k -r -O7                         16537      22542
  193. ucc -tp020 -O7                            20779      21426
  194. ucc -tp020 -r -O7                         22299      18942
  195. ucc -tp020c -r -O7                        22206      21070
  196. ucc -tp020c -r -O7 -t=100                 32820      22934
  197.  
  198. gcc -O -o68 -ob                           18099      15274
  199. gcc -O -o68 -ob -mnostack-check           21650      15130
  200. gcc -O -o68 -ob -m68020                   21577      18034
  201. gcc -O -o68 -ob -mnostack-check -m68020   26622      17890
  202. gcc -O -ob -mnostack-check -m68020
  203.     -fomit-frame-pointer -fforce-mem
  204.     -fcombine-regs                        30477      17774
  205.  
  206. cc -k0wcw -q -O=2                         12432      15482
  207. cc -k0wcw -S -q -O=2                      13570      15342
  208. cc -k2wcw -q -O=2                         17259      18238
  209. cc -k2wcw -S -q -O=2                      19716      18098
  210.  
  211. ------------------------------------------------------------------------------
  212.  
  213. Program   : dhry V2.0
  214. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  215. Date      : 92/11/08
  216. Compilers : ucc V1.0, gcc V1.42, cc V3.2
  217.  
  218. compiler/options                        dhry/sec      size
  219. ====================================== =========== ==========
  220.  
  221. ucc -tp020 -O7                            17247      23260
  222. ucc -tp020 -O7 -r                         18920      22920
  223. ucc -tp020c -O7 -r                        18900      22892
  224. ucc -tp020 -O7 -r -t5                     23431      23044
  225. ucc -tp020 -O7 -r -t100 -s0               26657      23612
  226. ucc -tp020 -O7 -r -t0 -s100               18679      22924
  227. ucc -tp020 -O7 -r -t5 -j                  27042      25306
  228.  
  229. gcc -O -ob -m68020 -fcombine-regs
  230.     -fomit-frame-pointer -fforce-mem      20800      19082
  231. gcc -O -ob -m68020 -fcombine-regs
  232.     -fomit-frame-pointer -fforce-mem
  233.     -mnostack-check                       25918      18938
  234.  
  235. cc -k2wcw -O=2                            14256      19536
  236. cc -k2wcw -O=2 -S                         16425      19292
  237.  
  238. ------------------------------------------------------------------------------
  239.  
  240. Program   : whet
  241. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  242. Date      : 92/11/08
  243. Compilers : ucc V1.0, gcc V1.42
  244.  
  245. compiler/options                        whet/sec      size
  246. ====================================== =========== ==========
  247.  
  248. ucc -O7 -tp020                           4633000     22986
  249. ucc -O7 -tp020 -t5                       4738750     23230
  250.  
  251. gcc -O -mc68040                         45745600     21436
  252. gcc -O -mc68040 -fcombine-regs
  253.     -fforce-addr                        46332000     21358
  254.  
  255. gcc -O -m68020 -m68881                   4689900     16730
  256.  
  257. ------------------------------------------------------------------------------
  258.  
  259. Program   : whet
  260. Machine   : NDR Computer (68030 25MHz, 68882 25MHz)
  261. Date      : 92/11/08
  262. Compilers : ucc V1.0, gcc V1.42
  263.  
  264. compiler/options                        whet/sec      size
  265. ====================================== =========== ==========
  266.  
  267. ucc -O7 -tp020                          12180200     22986
  268.  
  269. gcc -O -mc68040                          8631100     21436
  270.  
  271. gcc -O -m68020 -m68881                  13372500     16730
  272.  
  273. ------------------------------------------------------------------------------
  274.  
  275. Program   : primes (sieve)
  276. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  277. Date      : 92/11/14
  278. Compilers : ucc V1.0, gcc V1.42
  279.  
  280. compiler/options                         comp time   exec time     size
  281. ====================================== ============ =========== ==========
  282.  
  283. ucc -bc -O7                                  4         1480ms      21204
  284. ucc -bc -O7 -tp020                           4         1440ms      19844
  285. ucc -bc -O7 -t=5                             4         1500ms      21292
  286. ucc -bc -O7 -t=100                         634         1460ms      28148
  287.  
  288. gcc -O                                       2         1170ms      13868
  289. gcc -O -mc68020                              2         1170ms      13868
  290.  
  291. ------------------------------------------------------------------------------
  292.  
  293. Program   : espresso (logic minimization)
  294. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  295. Date      : 92/11/21
  296. Compilers : ucc V1.0, gcc V1.42, cc V3.2
  297.  
  298. compiler/options                         comp time   exec time     size
  299. ====================================== ============ =========== ==========
  300.  
  301. ucc -O7 -tp020                             790         6.95       145848
  302.  
  303. gcc -mc68020 -ob -fcombine-regs
  304.     -fforce-mem                            167         5.86       114596
  305.  
  306. cc -O=2 -k2wcw                             127         6.27       133678
  307.  
  308. ------------------------------------------------------------------------------
  309.  
  310. Program   : xengine (X11R4 server compiled with gcc)
  311. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  312. Date      : 92/11/22
  313. Compilers : ucc V1.0, gcc V1.42, cc V3.2
  314.  
  315. compiler/options                          speed       size
  316. ====================================== =========== ==========
  317.  
  318. ucc -tp020 -O7 -t5                      122.4 rpm    484028
  319.  
  320. gcc -m68020 -m68881 -O                  123.4 rpm    471998
  321.  
  322. gcc -m68040 -O                          135.2 rpm    475334
  323.  
  324. cc -k2f -O=2                            123.1 rpm    474334
  325.  
  326. ------------------------------------------------------------------------------
  327.  
  328. Program   : gnu-compress 4.0 (times for a 600k file on RAM-disk)
  329. Machine   : KWS cpUnit040 (68040 25MHz, 1 User, no other active processes)
  330. Date      : 92/11/22
  331. Compilers : ucc V1.0, gcc V1.42
  332.  
  333. compiler/options                            compress    decompress
  334. ========================================== =========== ============
  335.  
  336. ucc -O7                                       33.10        22.80
  337. ucc -O7 -t5                                   32.57        22.97
  338. ucc -O7 -t5 -tp020                            20.60        14.09
  339. ucc -O7 -tp020 -j                             21.40        14.65
  340.  
  341. gcc -O                                         8.36         5.38
  342. gcc -O -m68020                                 7.98         5.74
  343.  
  344. cc -O=2 -k2wcw                                 8.09         5.79
  345.