Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!bpa!cbmvax!martin From: martin@cbmvax.commodore.com (Martin Hunt) Newsgroups: comp.sys.amiga Subject: Re: Lattice C questions. Message-ID: <13270@cbmvax.commodore.com> Date: 18 Jul 90 05:03:22 GMT References: <1083@orange9.qtp.ufl.edu> Reply-To: martin@cbmvax (Martin Hunt) Distribution: na Organization: Commodore, West Chester, PA Lines: 74 In article <1083@orange9.qtp.ufl.edu> sutherla@qtp.ufl.edu (Scott Sutherland) writes: > > I am about to delve into the world of Amiga C. (Most >of my C programming has been on a SUN 3/50) I have read >many of the Amiga C books, but I am going to start simple >so that I can learn the intricacies of the Lattice C compiler. >I have version 5.05 installed on the Hard Disk of my A3000. >Now, the documentation for the 5.0 version says that the >compiler can optimize for the 68030 chip AND can take into >account the 68882. I want to run some test programs (one >of them given to me by a fellow grad student who uses it >as his unofficial benchmark for computer system speeds) >optimized for the 68030 and I want to test them both with >the 68882 AND without it (e.g. software emulation of math >functions). > > As a novice to the Lattice environment, could someone >please explain to me, with examples if possible, the major >compiler flags involved in optimizing for the 68030, 68882, and >software floating point emulation? I could ferret through >the manual for a while and figure it out, but my friend is >leaving Friday and he is very interested in seeing the results >of his unofficial benchmarks. > >Thanks, > >Scott Sutherland >sutherla@qtp.ufl.edu > >BTW, this unofficial benchmark is doing a 3x3 matrix multiply >20000 times and then checks to see what the number of calculations >per minute are. Here is the code. I'd appreciate it if someone >would tell me if it will run UNALTERED on the A3000 AND what the >optimum compiling options would be. > Except for a problem with a few '{'s that should be '}'s, the code you posted runs as is on a 3000. I linked in my own time() function that has higher resolution than 1 second. > >Source: > >* Program to get a "crude" estimate of the performance of a system. >* The rate is the number of 3x3 matrix multiplies done 20000 times >* divided by the elapsed time in seconds. >* >* >* 6/24/90 >* >* rates for Idx loop of 20000: >* >* >* Machine rate relative >*------------------------------------------------------------------ >* 1 Leading Edge PC-XT 7.44 MHz 185.19 1.0 >* with 8087. >* 2 Sun 3/280 ffpa 2857.14 15.4 >* 3 Sun 3/50 68881 1176.47 6.4 >* 4 Sun 3/280 SPARC 10000.0 54.0 >* 5 Packard-Bell 386SX w/out /387 127.39 0.69 >* 16 MHz floating point emulation >* Amiga 3000/68882 3740 20 Amiga 500 146 .79 For the 3000, use lc -m3 -f8 -O -Lm program.c It is rather interesting that an Amiga 500 runs this benchmark faster than a 386SX. -- Martin Hunt martin@cbmvax.commodore.com Commodore-Amiga Engineering {uunet|pyramid|rutgers}!cbmvax!martin