Game Development Community

What are the benefits of different compilers?

by Mike Fosker · in Technical Issues · 12/01/2005 (4:14 am) · 8 replies

HI, I apologise if this has been asked before, I did have a look through the oold posts to try and find the answer...
Are there different benefits of using one compiler over another in terms of the quality / speed / stability of the exe that is produced?
There seem to be plenty of different compilers to use, and I am quite happy to stick with Visual Studio, but i wonder if I might see performance improvements if I use someting different to compile.
I'd also like to know if using different compilers would allow the products to run on older or slower machines?

Thanks
Mike

#1
12/01/2005 (3:01 pm)
I can't comment on other compilers, as I only use VS currently. The various flavors of it though (student, enterprise, etc) will produce different results. The more expensive the version, the more optimized the code.
#2
12/05/2005 (1:38 am)
There are huge differences in the quality between compilers. For compliance with
the C++ language, Comeau is usually considered #1. Metrowerks (when they ran on useful
platforms) was also pretty good. GCC is really up there these days. Visual C++ is getting
better, but still has a long way to go. Borland's at the bottom of the list.

For runtime performance, I know GCC took a hit recently for rewriting their optimization
architecture. I believe Intel's compiler is supposed to be good, and visual c++ isn't terrible.
Comparing visual c++ to gcc, I couldn't tell you. The folks to ask about this stuff hang
around news://comp.lang.c++.moderated
#3
12/05/2005 (2:01 am)
@Lally is Comeau still around? The website hasn't seen an update in 3 years.

@Michael, If you want you code to be cross platform I highly recommend familiarzing yourself with GCC as far as compilers go. And Eclipse as far as IDEs ar concerned. When it comes to optimizing for a Windoze environment VS is still the best choice, however GCC comes in a very close second over all.
Oddly enough though when I compiled TGE with TBE I wound up with a smaller executable and a higher frame-rate than with VS 7.0. However this difference was quickly reversed when I upgraded to 7.1

Just some food for thought.
IMHO unless you want money from Linux and Mac customers, you should just stick with VS, at least until you are ready to make something cross-platform.
#4
12/05/2005 (7:02 am)
@Dreamer: If you look real close, you'll see that they've made some small changes to the website now and again this year... Not many changes... you'll have to look real close :-) They put out an early-release mac port earlier this year.

When I was doing a little gcc hacking a year or two ago, whenever there was a concern about parsing bugs, the first question is always: "Does comeau compile it?".
#5
12/05/2005 (7:03 am)
Is TBE good for development? everytime I read something about it on this site it always gives the impression that it's more of a 'getting started' kit, as if it's not suitable for intermediate development. Is there any downfalls or cons with this development environment? why is it only suitable for 'getting started'?
#6
12/05/2005 (11:37 am)
Sean - The only thing I noticed when switching from Visual C++ 6 to TBe is that it takes a bit longer to compile.
#7
12/05/2005 (1:37 pm)
Quote:
Visual C++ is getting better, but still has a long way to go.

Actually, the compiler for Visual C++ 2003 is 97% standards compliant. They pushed this up to 98% with the compiler in Visual C++ 2005. In my experience that last 2% of compliance tends to hurt a programmer's productivity quite a bit and is generally best left unimplemented. VC++ isn't as verbose (by default) in its warnings as gcc but its compliance is very comparable. Yes, VC++ 6 was horribly uncompliant to the C++ standards but it is also 10 years old and we are dropping support of it after this version of TGE.
#8
12/06/2005 (2:12 am)
Thanks for all the input, sounds to me like I would be best staying with Visual Studio as I am a bit of a novice with C++ at the moment. If I find that the performance is lacking then I'll look into your other recommenedations.
Cheers