korfhage@CS.UCLA.EDU (07/02/88)
The subject line says it all: what C compiler generates the fastest code? We just got Lightspeed C (v. 2.15), and someone in the group wrote a numerical integration program and said it ran on a Mac II at 1/4 the speed of an unloaded vax 11/750. Quite disappointing, and a bit puzzleing. A Sun 3/280 is, if I recall correctly, a 20 Mhz 68020, and seems to run several times faster than a 750. A Mac II is a 16 Mhz 68020, and even allowing for wait-states in memory access, one would not think that the Mac II would run at only a fraction of the Vax's speed. Perhaps it was the heavy numerical calculations? We do a fair amount of simulation, and were thinking about getting a Sun 3/280 to replace our creaky old vax. However, I put forth the idea of spending the money on fast 68030 cards for our Mac IIs instead. This seems to discredit the idea, although it is difficult to believe that such cards would be hard pressed to keep up with a 750. Willard Korfhage ARPA : korfhage@cs.ucla.edu UUCP : {ucbvax,ihnp4,randvax,trwrb!trwspp,ism780}!ucla-cs!korfhage
jwhitnell@cup.portal.com (07/03/88)
korfhage@CS.UCLA.EDU writes... | The subject line says it all: what C compiler generates the fastest code? |We just got Lightspeed C (v. 2.15), and someone in the group wrote a |numerical integration program and said it ran on a Mac II at 1/4 the speed |of an unloaded vax 11/750. LSC 2.15 does not support direct access to the 68881. It uses SANE which uses the 68881, which of couse is much slower. Version 3.0 is suppose to support direct access the 68881, which will of couse speed up your program. MPW 2.0 does support direct access to the 68881 and is also a true optimizing compiler. So while I've not done any performance numbers, I supsect MPW will be the faster of the two for your application. -- Jerry Whitnell jwhitnell@cup.portal.com ..!sun!cup.portal.com!jwhitnell
nick_john_pilch@cup.portal.com (07/03/88)
LSC 2.15 does not generate code that uses the 68020 or the 68881 math coprocessor chip directly. Floating point is done through software - Apple's SANE. SANE on a Mac II is smart enough to use the Math coprocessor itself but I imagine that there's a speedup when the 68881 can be called directly rather than going trough the overhead of SANE. MPW C can produce code for the Mac II. You can set compiler options to use the 68020 instruction set and make direct calls to the 68881. (SANE is Standard Apple Numerics Environment, I think) -NP
woody@tybalt.caltech.edu (William Edward Woody) (07/04/88)
The word I have is that the MPW C compiler version 2.0, provided by Greenhills is considered one of the best optimizing C compilers nowadays, and is the same front-end which appears on several mainframe C compilers. However, I don't have any statistics to back up this statement... After having worked with the MPW C compiler for quite some time, and delving into the guts of the generated assembly, it sure does look very optimal. And the MPW C compiler does support the 68020 and the 68881, but the code generated for those processors is not as optimal as possible. - William Edward Woody woody@tybalt.caltech.edu (Mac>][n&&/|\)&&(MacII>AT) Disclamer: I haven't the foggiest idea what I'm talking about...
singer@endor.harvard.edu (Rich Siegel) (07/04/88)
In article <14105@shemp.CS.UCLA.EDU> korfhage@CS.UCLA.EDU (Willard Korfhage) writes: >We just got Lightspeed C (v. 2.15), and someone in the group wrote a >numerical integration program and said it ran on a Mac II at 1/4 the speed >of an unloaded vax 11/750. Quite disappointing, and a bit puzzleing. A Version 2.15 of LightspeedC generates traps to the SANE routines in the Mac II ROM for floating-point calculation. The SANE routines do eventually call the 68881, but they're still very much slower than calling the FPCP directly. The (now available) version 3.0 of LightspeedC has compiler options to generate code for the FPCP and for the 68020. If you use these options, combined with the high-performance math libraries (pats self on back multiple times :-) ) you'll find that the speed of your numerical integrations will be mcommensurate with the Mac II's true speed. -Rich Rich Siegel THINK Technologies Rich Siegel Quality Assurance Technician THINK Technologies Division, Symantec Corp. Internet: singer@endor.harvard.edu UUCP: ..harvard!endor!singer Phone: (617) 275-4800 x305
jdm@ut-emx.UUCP (Jim Meiss) (07/12/88)
fast is it really: e.g. how many kiloflops? or what fraction of a VAX 750?