[wplug] Compiler questions

Tom Rhodes trhodes at FreeBSD.org
Thu Feb 3 09:45:35 EST 2005


On Thu, 3 Feb 2005 08:44:43 -0500
Bill Moran <wmoran at potentialtech.com> wrote:

> Burt E Reany <breany at csc.com> wrote:
> > 
> > They used to tell me that about good COBOL, as well - -
> > 
> >> I heard  well written C code compiled with architecture specific and
> >> other optimizations has a trivial difference with native assembler
> >> code.
> 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x86.html
> 
> If you read through that tutorial, I think you'll realize that any compiled
> language is very unlikely to be as optimized as well-written assembly.  The
> article talks about certain optimizations that I simply can't imagine a
> compiler being able to make.

Does the Intel C Compiler produce better binaries than GCC?  Yes,
true optimisation would come more effectively if you did not need
to build support for every architecture known into the compiler.
Same goes with languages.  It would be really nice if there was
effectively a compiler for each architecture which would make use
of every known optimization available; however, I'm not sure who
would be insane enough to put forth this effort.

There are of course language optimizations; for instance if you
would store data in the stack in place of buffers, that shaves
off a few picoseconds here and there, and can be extremely useful
on large applications; however, daunting.  Wonder how effective
that would be in, for instance, KDE.

And surprisingly, throughout this entire conversation, I have not
heard the words "warning levels" at all.

-- 
Tom Rhodes


More information about the wplug mailing list