[rescue] Sun 3/60

Greg A. Woods rescue at sunhelp.org
Thu Aug 16 11:47:28 CDT 2001


[ On Thursday, August 16, 2001 at 04:35:41 (-0400), Dave McGuire wrote: ]
> Subject: Re: [rescue] Sun 3/60
>
>   I'm sure you wouldn't have.  However, and I'm at a loss to explain
> the difference, X11R4 and R5 perform easily three times better when
> compiled with gcc as compared to Sun bundled cc under SunOS4 on M68K
> hardware.

Did you get your comparison from x11perf results, or the general
feel of things with interactive use?

I couldn't reproduce anything near such factors of difference with any
other non-graphics application I ever tested GCC-vs-CC on, and I did
some pretty serious benchmarking at one time....

>  Even the X release notes strongly advise its use for
> exactly that reason.  The same is true for VAX processors, by the way.

No, none of the X11 release notes I can find from MIT or the X
Consortium have ever recommended building with GCC on *any* platform for
performance reasons.

Indeed building X11R5 with GCC-v2.x required special effort on sparc and
m68k!

In X11R6 they recommend GCC for SunOS simply because they are no longer
providing strict K&R code:

    In all cases except SunOS we have used the vendor's compiler.  On SunOS
    we build with gcc.

That claim has nothing whatsoever to do with the quality of the compiler
or the performance of the generated code.  It's simply a matter of
portability and migration to use of ISO C standard coding in X11.  Note
they don't even mention anything in particular about the processor.
Note too that they don't mention SunPRO-C, though that would solve the
problem equally well, if not better.

I've done the back-port of X11R6.1 to SunOS-4 K&R cc though and it
wasn't hard at all.  With R6.3 there's a bit more code to convert back,
but it's still just simple monkey work....


Someday this winter, when I need an extra heater in the basement, I'll
fire up one of my sun3's and get the latest NetBSD running on it.  Then
I can pull a copy of SunOS-4's compiler from tape and try compiling some
sample code with both it and with NetBSD's GCC-based (probably 3.0 by
then) compiler and see how they compare.  I guess if I were a real nut
for punishment I'd get GCC-1.42 off the shelf and compare it too.  I
suspect it was better in some ways than 2.x.x for i386 and m68k, at
least up until the most recent values of .x.x.

For free C compilers for VAX, m68k, or even sparc code, for that matter,
I'd look hard at LCC too -- it's a pretty nice compiler with good
results and has been used in production in several large environments
(including at AT&T).


GCC-3.0 does promise somewhat better code optimisation, as well as new
and much improved code generators for both i386 and PowerPC (and
hopefully eventually sparc too, though I suspect they'll focus on just
ultrasparc since 2.95 already included a sparc backend rewrite which
though good is still not even up to matching SunPRO-C-5.0 from 1998).

GCC is a very fine compiler, for a free one, especially for a free one
with so many backend code generators and front-end language processors,
but it's far from being "best of breed", not for any input language or
target architecture.

There's probably now, finally, as much real $$$ being put into GCC
development as with the average commercial compiler (and unlike most
other commercial software developers, compiler vendors are very serious
software engineers!).  It takes real $$$ to dedicate the time of serious
compiler experts to work on any compiler, GCC or otherwise, as the best
of the breed are normally the type who only do what their paid the most
to do.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods at acm.org>     <woods at robohack.ca>
Planix, Inc. <woods at planix.com>;   Secrets of the Weird <woods at weird.com>



More information about the rescue mailing list