Comeau C++

“Rennie Allen” <RAllen@csical.com> wrote in message
news:64F00D816A85D51198390050046F80C9B568@exchangecal.hq.csical.com

I agree, my interest is not stirred unless benchmark results are of a
different magnitude, 10-20% performance differences with one particular
piece of code, might simply mean that one compiler does better with a
particular coding and/or design style. If this happens to be your
design/coding style, then it might behoove you to select the compiler
that does better, but this certainly doesn’t serve as a good
generalization (as if there is such a thing as a good generalization > :slight_smile:


Mario, you can make no assumption at all, as to what the final
executables performance would be from Comeau C object code compiled with
gcc without testing your C++ code with the actual toolchain (this sucks,
but that’s life - who knows it might be 30-40% slower, or 10-20% faster
:wink:> . Personally, I would much rather use a 99% compliant compiler
that’s 20% slower, than a 90% compliant compiler that just so happens to
“like” my (possibly non-C++) coding style.

Interesting point Rennie. My opinion in this case is based on gut feeling
not actuall fact, I will grant you that.

In my cases I’d prefer a 20% faster code. If a system can be
build with a 100Mzh instead of 133Mzh then that’s money
in my customer pocket (assuming large volume). If the same
software can run 20% faster, on the same unit, then on
a competitor’s equivalent machine, I’ve got a major advantage.



-----Original Message-----
From: > comeau@panix.com > (Greg Comeau) [mailto:> comeau@panix.com> ]
Posted At: Saturday, September 08, 2001 1:47 PM
Posted To: devtools
Conversation: Comeau C++
Subject: Re: Comeau C++


In article <9ndv51$eb3$> 1@inn.qnx.com> >,
Mario Charest <> mcharest@nowayzinformatic.com> > wrote:
“Greg Comeau” <> comeau@panix.com> > wrote in message
news:9ndutq$rhl$> 1@panix3.panix.com> …
In article <9nbm4m$47q$> 1@inn.qnx.com> >,
Mario Charest <> mcharest@nowayzinformatic.com> > wrote:
“Greg Comeau” <> comeau@panix.com> > wrote in message
news:9nbev6$194$> 1@panix3.panix.com> …
In article <> 3B9939D3.AA339A28@faac.com> >,
Dean Douthat <> ddouthat@faac.com> > wrote:
Since it uses GCC, I’m assuming it will work for any of the QNX6
target
platforms. Right?

If we don’t make it so, then that’s not right.
If we do make it so, then that is right.
It really must be ported, literally, to every platform
(as mentioned in another post, when I say “platform”
that includes at least the CPU, OS, and C compiler).
It’s not enough to do it for one and expect meaningful
results for another platform. Make sense?

So that means it’s using GCC ;-( I think that if QNX was
to support another compiler, it should be something that
has nothing to do with GCC.

I’m not clear on what or what this is a problem?

Because code generate by GNU C isn’t that great, I would like
better. Many customer I worked with were rather pissed
at seeming the same software run 10-20% faster when compile
with VC for example.

Or am I mistaken; would Comeau C/C++ generate assembly
or object file directly.

You’re not mistaken on this last sentence. However,
isn’t it so that VC can’t be used with/for QNX?
If so, isn’t it so that the gcc used apparently under Windows
will not be the same code generator used with gcc under QNX
and/or other things can effect it?

I’m not saying gcc wasn’t or isn’t slower, just trying to
understand exactly what was tested, and under what auspices.
I find that comparison rarely ever really fairly compare.

Greg Comeau export ETA: Dec 1 10% “End of Summer” Offer
Comeau C/C++ ONLINE ==> > http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

In article <3B9D9409.A0DCF835@ou.edu>, Miguel Simon <simon@ou.edu> wrote:

Greg Comeau wrote:
In article <> 3B9D48F0.921E293@ou.edu> >, Miguel Simon <> simon@ou.edu> > wrote:
Colin Burgess wrote:
However, I don’t see any reasons why this shouldn’t work out, especially
since it just sits on top of gcc.

According to some of the comments made by others, it seems that a
perceived problem is the gcc compiler, and that this being the case,
then Comeau C++ will not necessarily help at compile time.

It depends what you’re tying to “help”.

Ok, please keep in mind that my particular background is in controls,
embedded systems, robotics, etc., BUT NOT in computer science, compilers
and the like. In general I use compilers as tools, but I am not well
versed in the art of compilers at large.

Ok.

Having said that, then how will Comeau ‘front-end’ help given…

C code => gcc => ok, not too bad |
| => obj file => exec bin file
C++ code => g++ => buggy, very bad |

when we want both C/C++ to generate (please, think embedded systems for
hard real-time applications which is an application realm with very
different needs to that of desk-OS, soft real-time, pseudo real-time and
postmortem data analysis platform and the like such as UNIX (SGI,
Solaris, Linux et. all), $$indow$, etc.):

  1. bug free code => robust…
  2. fast executable code => opt. or near optimal in exec. time…
  3. small sized code => because of limited memory…

THEN enter Comeau front-end…

C code => | | gcc |
| => Comeau => | | => exec.obj => exec.bin
C++ code => | | g++ |

needed??
optional??

What I do not see is what does Comeau do to "help" attain points (1),
(2), (3) in any optimal combination?  By modifying the original code via
Comeau-front-end>, and then presenting the whole thing to the gcc or
g++ compiler?

Then, if I read correctly, you mentioned in another sub-thread that
Comeau *could* do away with g++ altogether?

I understand that there are some trade off.  How will Comeau "help" with
both the C and C++ cases?  Do you optimize one over the other (say C
over C++)?  So if I hear you correctly, Greg, it seems that you can
"help" in some measure... which one: (1), (2), (3), a combination?  All
three?  For both C and C++?

Could you clearly stay what Comeau
would/could/will/can/wouldn't/couldn't/will-not/can-not do to help with
the needs of the QNX/Neutrino hard real-time community of embedded
developers and their applications?  (I guess that I am asking for a
white paper tailored to the aforementioned community?)

Please enlighten me at will for I rather be ignorant this one time as
opposed to remaining ignorant the rest of my life.

Anyway, yes, sorry for the confusion. I mean, as mentioned,
we could generate C++, but we have yet to sell that in any port
that’s “generally available” so yes, indeed, g++ does not come
into play. Only gcc does. So you can remove “buggy, very bad” :slight_smile:

We don’t hinder gcc in any way, and as mentioned from some tests
done years ago, we were even a tiny bit faster than either g++ or
gcc. Some magazines had reported being surprised by this too.
I don’t know if that’s still exactly true, but it’s not far off
and certainly the code is comparable. Just to be clear w.r.t.
your points: (2) and (3) should remain mostly stable.
And w.r.t. (1), well, other have already discussed this,
since we’re so strong in the language parts of C90, C99, and C++.

Is there ever anything else that can be done? Yes, and we
continually work on improving optimizations and such (there
are things we can do in the front end, and have done, and
so we will continue to do so).

In short, what Comeau w/c/ould/et al helps with is to provide
a robust, up to date, well maintained and reasonably compliant
compiler that is available for multiple platforms. As mentioned
previously, we feel that we are years ahead of other compilers
in terms of these things. That means we will have time to focus
on platform specific things now that the core product is so well
functional. In the meantime, other vendors are trying to
struggle through all parts simultaneously, and apparently that
shows.

I think you asked for too much to be explained above :slight_smile:
especially as I do not think there is a “aforementioned
community” per se, but I hope this message addressed
any of the significant parts. And of course, I’ll be glad to
discuss this further.

Greg Comeau export ETA: Dec 1 10% “End of Summer” Offer
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?