rif_xu@eds.ericsson.se (07/18/89)
I have compiled the standard Byte benchmark Savage using Think's LSC 3.01p4 on a MacII. I used the Math881lib and the std881lib and had the flags for '881 and '020 code generation set. It ran in 6 s. A version compiled in MPW C 2.02 ran in 3.3 s. Can anyone tell me why LSC generates so slow (MPW C is nearly twice as fast) code ? S Ruschkowski
fjo@cbnewsc.ATT.COM (frank.j.owen) (07/19/89)
From article <1630@eds.ericsson.se>, by rif_xu@eds.ericsson.se: > Can anyone tell me why LSC generates so slow (MPW C is nearly > twice as fast) code ? > Well, I think the answer is that LSC is NOT on optimizing compiler. (It does not have an optimization pass after code generation.) LSC does as well as it does due to it's very good code generator. MPW DOES have an optimization pass. This makes it a slower compiler, but generates faster code. -- Frank Owen (fjo@ttrdf) 312-982-2182 AT&T Bell Laboratories 5555 Touhy Ave., Skokie, IL 60077 PATH: ...!att!ttrdf!fjo
tim@hoptoad.uucp (Tim Maroney) (07/20/89)
In article <1630@eds.ericsson.se> rif_xu@eds.ericsson.se writes: > I have compiled the standard Byte benchmark Savage using > Think's LSC 3.01p4 on a MacII. I used the Math881lib and > the std881lib and had the flags for '881 and '020 code > generation set. It ran in 6 s. A version compiled in > MPW C 2.02 ran in 3.3 s. > Can anyone tell me why LSC generates so slow (MPW C is nearly > twice as fast) code ? Because MPW C does optimizing passes and Lightspeed C doesn't. MPW C puts everything it can in registers and does a number of the other standard optimizing tricks. Lightspeed C puts everything on the stack unless specifically commanded to put things in registers and does no optimizing tricks. It doesn't even use DBRAs. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Religion flourishes in greater purity without than with the aid of government." -- James Madison
rabbit@eddie.MIT.EDU (Warren J. Madden) (07/21/89)
In article <1853@cbnewsc.ATT.COM> fjo@cbnewsc.ATT.COM (frank.j.owen) writes: >From article <1630@eds.ericsson.se>, by rif_xu@eds.ericsson.se: >> Can anyone tell me why LSC generates so slow (MPW C is nearly >> twice as fast) code ? >> >Well, I think the answer is that LSC is NOT on optimizing compiler. >(It does not have an optimization pass after code generation.) >LSC does as well as it does due to it's very good code generator. >MPW DOES have an optimization pass. This makes it a slower compiler, >but generates faster code. > >Frank Owen (fjo@ttrdf) 312-982-2182 Hey Rich! Does Symantec have any plans to market an optimizing version of the LSC compiler? Developers could use LSC to do the development, then use SSC (Sound Speed C :-) to produce LSA's (Light Speed Applications). For those of us who feel the need for speed, such a product would allow us to stay in the LSC fold instead of defecting to MPW. Warren J. Madden rabbit@eddie.mit.edu ...!eddie!rabbit
d88-jwa@nada.kth.se (Jon W{tte) (07/21/89)
In article <12252@eddie.MIT.EDU> rabbit@eddie.MIT.EDU (Warren J. Madden) writes: > Does Symantec have any plans to market an optimizing version of the LSC Let's hope so ! >of us who feel the need for speed, such a product would allow us to stay in >the LSC fold instead of defecting to MPW. Just how much trouble is it really, compiling a finished program in MPW when it's written in LSC. Couldn't be all that hard, could it ? But then, you'd have to maintain two compilers :-( Curious minds (including mine) want to know... -- __ Jon W{tte (The dread Smiley Shark) email:h+@nada.kth.se / \ (+46 (0) 8 258 268) /--- (c) 1989 Yessbox Allright Professional Products Inc. - Y.A.P.P.I. / -- No More --
levin@bbn.com (Joel B Levin) (07/22/89)
In article <1331@draken.nada.kth.se> d88-jwa@nada.kth.se (Jon W{tte) writes: |Just how much trouble is it really, compiling a finished program in |MPW when it's written in LSC. Couldn't be all that hard, could it ? |But then, you'd have to maintain two compilers :-( | |Curious minds (including mine) want to know... *With a little planning*, very easy I should think (especially with MPW 3). If you know you are going to do this, you can build in the compatibility. Something like #ifdef MPW typedef short Integer; #else typedef int Integer; #endif and always use Integer instead of int in LSC. Also, most of the MPW <Foo.h> files are (a different set of) <FooMgr.h> files in LSC. So you may have to maintain two lists under conditionals. Or two separate ".h" files. Disclaimer: my experience is from porting some LSC code to MPW, not from actually trying to write compatible/portable code, since I don't have LSC. = UUCP: levin@bbn.com (new) or {backbone}!bbn!levin (old) INTERNET: levin@bbn.com POTS: (617) 873-3463 "The night was"