[rescue] Sun 3/60

Dave McGuire rescue at sunhelp.org
Thu Aug 16 03:35:41 CDT 2001


On August 16, Greg A. Woods wrote:
> >   Then why is it that X on an M68k built with gcc (circa early gcc 2.x
> > days) runs easily 2-3 times faster when built with GCC as compared
> > with Sun's cc?  Not to be argumentative, but...
> 
> I've always found the opposite to be true!

  Interesting.

...
> Indeed there are several code constructs that GCC could/can generate
> better m68k code for, but as anyone familiar with compiler benchmarks
> knows, it's always possible to make any given compiler shine better than
> all the rest if you know how to tweak the code you feed it (and manage

  I doubt if the X reference implementation was tweaked to favor
particular compilers for particular platforms.

> the often plentiful optimisation control parameters).  However given the
> relatively easy readability of m68k code, it's not too hard to spot
> constructs where GCC is abysmal too!

  No doubt.  But I'm not talking about comparing generated
assembler...I'm talking about the performance of the X reference
implementation, R4 and R5.

> The benchmarks that convinced me to stick with plain old SunOS-4's cc
> were real-world applications in the target domain of my production
> machines.  Things like web/news/ftp servers, script interpreters (mawk,
> perl, etc.), MTAs, etc.
> 
> Let me assure you that I wouldn't have gone to all the work I did at
> back-porting code to be strictly K&R conforming if I'd not felt the
> result would be well worth the effort!

  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.  Even the X release notes strongly advise its use for
exactly that reason.  The same is true for VAX processors, by the way.

      -Dave

-- 
Dave McGuire
Laurel, MD



More information about the rescue mailing list