Fog Creek Software
Discussion Board




Best C/C++ Compiler

Does anyone out there use the Intel C/C++ compiler?  I see it all the time in the Programmer's Paradise Catalogs and it claims to accelerate your application by generating the best possible assembly code.  Intel makes the chips so they must know how to write compilers eh?  I've used GCC and VC++ and of course Watcom and Turbo/Borland C/C++ all which were good products.  Never tried Metroworks Codewarrior Line.  Which one is the best though?  Tough question to answer.  If I remember right Watcom's compiler could output 386 32-bit assembly code. Wow.  But I did'nt like the IDE that it shipped with.  That was what mid 90's time-frame I think?  What are the best/most productive C/C++ compilers you have used?

Dave B.
Tuesday, January 28, 2003

A thought: The best compiler is the standard one.

If it's an open source project, it won't go far if it isn't compiled with gcc, because gcc is the de facto standard. Requiring developers or users to install a new compiler is annoying.

For windows, I doubt it's as cut and dry. All I know is that I remember it being a bitch to make a project written for Borland work for VC++ and vice versa, due to the project files. Has this changed any? Or was I just using poor libraries?

Mike Swieton
Tuesday, January 28, 2003

What are you most interested in?

Compile speed?

Speed of the resulting binary?

Standards compliance?


For me I'd say the all around winner is Visual Studio .NET 2003 (which is currently only available in beta release, but the final beta is VERY stable).

* Excellent standards compliance (don't laugh at this until you've tried it.  Microsoft has really taken this thing far beyond the broken state of the VC++6.0 days).

* Good optimization (may not quite as good as Intel's, but very close)

* No need to worry about .lib compatibility (ala Borland) since Visual C++ is the de facto Windows standard.

* Great IDE/debugger.

Flippy the Binhead
Tuesday, January 28, 2003

Our experiences with the Intel compiler (v6?) have not been good.  Compile times were *way* higher (6 times slower) than the Microsoft v7 compiler and the code was only marginally faster (and larger) after we tweaked the optimization settings a lot.

Not worth the pain, but YMMV especially if you have a mathematically intensive app.  In that case you might want to look at some of the performance libraries Intel has as well.

Just another dude
Tuesday, January 28, 2003

I was once the lead compiler engineer on the Metrowerks C/C++ compiler for x86, before moving on to PDA related development.  At that time (1998-2000), the compiler went from lackluster performance to beating VC++ on many benchmarks.  Floating point performance wasn't always 100%, but integer code performance did very well, and we did a lot of work on optimizing for AMD's K6-3D instruction set, and later the new instructions introduced in the AMD Athlon.  When I left the project, I think we were pretty comparable to VC++ 6, although generally a lot better in standards compliance.  Our compatibility with DLLs made for VC++ was good, but static libraries always suffered from compiler and runtime dependencies.

Today, the compiler has continued to improve.  The MSL standard libraries included with the CodeWarrior tools are excellent, and the IDE has gained a lot of nice abilities, but  the focus of the tools has been on cross-platform code, plugins, and scientific work.  The CW Win32 tools don't include a resource editor, but they will compile .rc files made with other tools.  V8 of the tools added MFC 6 and ATL 3 support, and we use them extensively at Metrowerks for development of our other products.

They aren't the best Win32 tools, but they do really well for many tasks.  If you've got more questions, checking the newsgroup codewarrior.windows is recommended.

Ben Combee
Wednesday, January 29, 2003

It totally depends on what you are doing... If you want the fastest or smallest code, you'll probably have to try several compilers yourself; in my experience no single compiler always delivers better results than the others. If you are using one of those template-intensive numerics libraries or STL a lot, you'll want a compiler that is good with templates.

AFAIK there is only ONE available C++ compiler that fully implements all aspects of the latest C++ standard. (forgot which one - was it Comeau's?)

Dan Maas
Wednesday, January 29, 2003

I have a copy of (the outdated?) Codewarrior for Windows v2.0, and it knocks socks off GCC 3.2 (Mingw) for the kind of code I write (genetic algorithms) which is very computationally intensive.  I'll have to look and see if I can upgrade it yet.. the newer Codewarrrior IDE might be much more VC++-like

a metrowerks fan
Wednesday, January 29, 2003

Watcom was of course bought by sybase wayback and they have since opensourced the compiler openwatcom.org i think.

Interesting debates on the sybase public forums about wether Watcom was really that fast (for building the powerbuilder ide). Try with google news if interested

Karel
Wednesday, January 29, 2003

Comeau C++ is a bit more compliant over Intel & VC2003 since it implements "extern" for templates, but this feature may turn out to be way more useless than many have thought. Intel (and VC2003 which seems to be very comparable) C++ has excellent standard compliance and excellent optimization features, also it's ~100% compliant to VC (Windows) and gcc (Linux).

You pay with looooong compilation times though! (And lots of money of course =) )

It depends on your application, really. I'd suggest trying it out yourself, Intel used to offer try-out packages for free.

Sebastian wagner
Wednesday, January 29, 2003

Borland's C++ compiler (in C++ Builder) excels in fast build times and precompiled headers, but I believe Microsoft's compiler does a better job at code optimization. I'd be interested in more information about this, since it's been a few years ago that I've used VC++.

Frederik Slijkerman
Wednesday, January 29, 2003

Not trying to get too off-topic, but to answer the question about the current CodeWarrior IDE on Windows, I'd say that it feels a lot more like a pure Win32 app these days, but that we've intentionally not cloned the VC++ interface.  We still have a very flexible project/target build system, the debugger still uses the three-pane browser model, and we still let you work in either MDI or FDI (VB-like) mode.  The current IDE supports some code completion, and it will let you dock and tab-group windows in flexible manner if you're in MDI mode.  We did a rework a couple of years ago, eliminating more of the Mac2Win porting library and rehosting on MFC, so a lot of quirks were cleared up then.

Ben Combee
Tuesday, February 04, 2003

this is weird

tyler smith
Saturday, September 06, 2003

band is cool

tyler smith
Saturday, September 06, 2003

I can't compile with watcom C.
I have three file
fractal.c
image.h
image.lib

how to compile and link them?

Victor
Monday, February 02, 2004

*  Recent Topics

*  Fog Creek Home