[comp.sys.mac.programmer] Think, MPW, AND gcc

jess@gn.ecn.purdue.edu (Jess M Holle) (06/26/91)

In hopes of finding some silverlining in the clouds of MPW, how does the
speed and size of gcc (the MPW ported version) compare with Think and
MPW C? I know that gcc doesn't produce debugger code and that it is slower
yet at compilation than MPW C. I would just like to be able to produce
fast, small code out of my finished source code with little or no changes.
Is this possible? Does gcc work under System 7.0? Does it use MPW C's
headers? If not, how do you get access to System 7.0 features (I'm assuming
that it works w/ System 7.0)?

Thanks in advance for your responses.

Jess Holle

dorner@pequod.cso.uiuc.edu (Steve Dorner) (06/26/91)

In article <1991Jun25.181936.29476@gn.ecn.purdue.edu> jess@gn.ecn.purdue.edu (Jess M Holle) writes:
>In hopes of finding some silverlining in the clouds of MPW, how does the
>speed and size of gcc (the MPW ported version) compare with Think and
>MPW C?

The docs that come with the port indicate several things:

1) The compiler is a pig; 4M to run.
2) The code produced is about 10% faster, around the same size.
3) The compiler is designed as a drop-in replacement for the MPW C compiler;
   it's compatible with supplied libraries, header files, linker, etc.

Or that's what I remember.  I couldn't quite bring myself to use a different
production compiler from my debugging compiler, even though I'm quite fond
of gcc on UNIX.
--
Steve Dorner, U of Illinois Computing Services Office
Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner

ml27192@uxa.cso.uiuc.edu (Mark Lanett) (06/26/91)

dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:

>In article <1991Jun25.181936.29476@gn.ecn.purdue.edu> jess@gn.ecn.purdue.edu (Jess M Holle) writes:
>>In hopes of finding some silverlining in the clouds of MPW, how does the
>>speed and size of gcc (the MPW ported version) compare with Think and
>>MPW C?

>The docs that come with the port indicate several things:

>1) The compiler is a pig; 4M to run.
>2) The code produced is about 10% faster, around the same size.
>3) The compiler is designed as a drop-in replacement for the MPW C compiler;
>   it's compatible with supplied libraries, header files, linker, etc.

Also, it requires Asm (it's not a native compiler). It requires the 3.1 headers
because it doesn't understand the #pragma in the 3.2 headers (and apparently
isn't going to learn about them), so using it for system 7 stuff would seem
difficult.

>Or that's what I remember.  I couldn't quite bring myself to use a different
>production compiler from my debugging compiler, even though I'm quite fond
>of gcc on UNIX.
>--
>Steve Dorner, U of Illinois Computing Services Office
>Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
--
//-----------------------------------------------------------------------------
Mark Lanett						mlanett@uiuc.edu
Software Tools Group, NCSA

neeri@iis.ethz.ch (Matthias Ulrich Neeracher) (06/26/91)

In article <1991Jun26.004523.23230@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
>In article <1991Jun25.181936.29476@gn.ecn.purdue.edu> jess@gn.ecn.purdue.edu (Jess M Holle) writes:
>>In hopes of finding some silverlining in the clouds of MPW, how does the
>>speed and size of gcc (the MPW ported version) compare with Think and
>>MPW C?
>
>The docs that come with the port indicate several things:
>
>1) The compiler is a pig; 4M to run.

Actually, I believe it runs with somewhat less. The interesting thing is that
memory usage doesn't seem to grow as quickly as for MPW C. gcc was able to
compile a particularly nasty file that MPW C couldn't do in the available
memory (Imagine the C code generated from a flex file with 450 looong rules).

>2) The code produced is about 10% faster, around the same size.

Except for multiplications with constants, for which MPW C generates code that
is both faster and smaller. I found the speed difference not that significant,
but then I use a lot of pointers and not very tight loops. The similiarities of
MPW and GCC code led me to conclude that MPW C code quality is generally
underestimated, fiven gcc's reputation.

Matthias

----
Matthias Neeracher                                      neeri@iis.ethz.ch
   "These days, though, you have to be pretty technical before you can 
    even aspire to crudeness." -- William Gibson, _Johnny Mnemonic_

evensen@husc9.harvard.edu (Erik Evensen) (06/26/91)

maybe this is getting ambitious but does anyone know if a) g++ has
been ported to work with MPW and b) if it has been ported, will it
work with MacApp?  If not: something to think about?

--Erik (evensen@husc.harvard.edu)