Board index » cppbuilder » The best C++ compiler (not the IDE)
Flienxy
CBuilder Developer |
Flienxy
CBuilder Developer |
The best C++ compiler (not the IDE)2005-03-28 02:51:22 PM cppbuilder20 gcc, Dev-C++, Intel C++, Watcom, BCB, VC++, . . ., are some of the C++ compilers that I know by name. I'm sure there are many more. How can we compare a particular C++ compiler with others? What would be the sets criterions? Is there any "commonly accepted" comparison metrics and how the above mentioned (and many more) compilers score on this comparision? How the BCB's compiler would score compared to others? (optimistically/unrealistically assume that BCB still an acceptable product on the market) |
maeder
CBuilder Developer |
2005-03-28 04:54:27 PM
Re:The best C++ compiler (not the IDE)
<Flienxy>writes:
Quotegcc, Dev-C++, Intel C++, Watcom, BCB, VC++, . . ., are some of the C++ Executable speed Executable size Quality of diagnostic messages "peripheral" products (such as vendor-specific tools) they come with ... QuoteIs there any "commonly accepted" comparison metrics and how the less complies, so they seem to have vanished. QuoteHow the BCB's compiler would score compared to others? |
Duane Hebert
CBuilder Developer |
2005-03-28 08:12:57 PM
Re:The best C++ compiler (not the IDE)
<Flienxy>wrote in message news:4247a971$ XXXX@XXXXX.COM ...
Quotegcc, Dev-C++, Intel C++, Watcom, BCB, VC++, . . ., are some of the C++ using boost, the higher its standard conformance is, though this is probably a rule of thumb at best. QuoteHow the BCB's compiler would score compared to others? {smallsort} |
maeder
CBuilder Developer |
2005-03-28 09:18:41 PM
Re:The best C++ compiler (not the IDE)
"Duane Hebert" < XXXX@XXXXX.COM >writes:
Quote>How can we compare a particular C++ compiler with others? What rather how much work the library boosters did to work around the many deficiencies in that compiler. Any test suite that causes Visual C++ 6 to score higher on Standard compliance than BCB6 is a joke. |
Duane Hebert
CBuilder Developer |
2005-03-28 09:35:22 PM
Re:The best C++ compiler (not the IDE)
"Thomas Maeder [TeamB]" < XXXX@XXXXX.COM >wrote in message news: XXXX@XXXXX.COM ...
Quote"Duane Hebert" < XXXX@XXXXX.COM >writes: QuoteAny test suite that causes Visual C++ 6 to score higher on Standard of the guys at boost. But I think that looking at the part marked "broken" should give some clue. BTW do you know of any better resources for the OP? I would think Comeaux is the most compliant, VC7.1 the next. After that, I'm not sure. As I also mentioned, there are factors beside compliance that may be important. I noted reliance on VCL but I would also add that an actively supported compiler would probably be preferable as well. Additionally, for me, the ability to use boost libs would rank near the top. |
Chris Uzdavinis
CBuilder Developer |
2005-03-28 10:42:04 PM
Re:The best C++ compiler (not the IDE)
<Flienxy>writes:
QuoteHow can we compare a particular C++ compiler with others? What benchmarks that can test how good the runtime performance is of the generated code. You can look at the size of the resulting executable, after taking reasonable efforts to eliminate debugging symbols, use similar linking strategies, and other size-related stuff) to compare the compactness of the generated code. Different categories may have different winners, and there aren't any single industry-standard tests for any category. -- Chris (TeamB); |
Alisdair Meredith
CBuilder Developer |
2005-03-28 11:28:58 PM
Re:The best C++ compiler (not the IDE)
Duane Hebert wrote:
QuoteIt doesn't look to me that MSVC6 scores higher than BCB6 so well is that when you find a workaround techniquue it is fairly stable. Borland swallows more of the standard in the first place, but does not handle corner cases so well. Switching to a different implementation technique usually stresses different corner cases. Boost tests are very good at stressing corner cases. QuoteBTW do you know of any better resources for the OP? compatibility. In particular, the export keyword is not available, and I am not sure about 2 phase lookup for templates. Metrowerks also implement 2 phase lookup, something MS have said they have no current plans to implement, although I have no exhaustive comparison on the rest of the language to see how they compare. My gut says they might be ahead. Apparently GCC added 2 phase lookup for v3.4 and is pushing {*word*156} some compliance issues. I am still using 3.3 for testing, and suspect VC7.1 has a slight edge over this version. I have not looked at any of the other Windows compilers recently enough to give a fair rating - they were all a long way off last time I checked. Note: there are generally 2 areas that stress current implementations still. 'Corner case' template use (export keyword, 2 phase lookup) and the preprocessor. The latter passes a lot of people by, until they get serious about any pre-processor metaprogramming, when you suddenly discover how hard it is to write portable code past all the buggy PP implementations out there. There appears to be very little interest in improving PP conformance either - no-one wants to encourage greater use of teh PP in C++! AlisdairM(Teamb) |
Lai Chi Wai
CBuilder Developer |
2005-03-29 01:50:31 PM
Re:The best C++ compiler (not the IDE)
Dear all,
I think the 3 most important aspect of a C++ compiler are: Standard conformance. Executable performance. Executable size. For standard conformance, there is a test suit from ISO/ANSI which can be used for testing. Currently, GCC should perform the best and following VC++ 7.1. Because of the age of BCB 6, it really behinds the standard (mainly in template implementation). For executable performance, GCC and VC++ 7.1 is head to head in the top. For executable size, I have no information or experience on it. When consider about the tools shipping with the compiler, VC++ and MetroWork's C++ compiler seems to win the race. When consider about the ease of use in Window programming, BCB wins. Regards, Keith Lai. |
Chris Uzdavinis
CBuilder Developer |
2005-03-29 10:41:39 PM
Re:The best C++ compiler (not the IDE)
"Lai Chi Wai" < XXXX@XXXXX.COM >writes:
QuoteDear all, optimizations for creating classes where the complier writes 3 or 4 versions of your constructor in the executable, with each being optimized for different scenarios (even though your source code only has one constructor.) For example, if your class uses virtual inheritance, the difference may be whether your class's constructor should initialize the virtual base first or not. Thus, when the actual type of an instance is your derived type, it uses one generated constructor. If the actual type of an object derives from your derived class, the generated code may use another constructor, etc. These types of things happen in many situations, and rarely can happen together, except if it's eliminating dead code and factoring out common code. (Though factoring out common code may slightly slow down the runtime too, unless it decreases the pages to where the program code fits better without being moved in memory, etc. It's a very complicated issue!) QuoteFor executable performance, GCC and VC++ 7.1 is head to head in the top. but other compilers are much better. For example, the pathscale C++ compiler claims to generate code up to 40% faster than GCC. QuoteFor executable size, I have no information or experience on it. environment, obviously the importance goes up. QuoteWhen consider about the tools shipping with the compiler, VC++ and QuoteWhen consider about the ease of use in Window programming, BCB wins. -- Chris (TeamB); |
Chris Uzdavinis
CBuilder Developer |
2005-03-29 11:44:54 PM
Re:The best C++ compiler (not the IDE)
"Doug Tinkham" < XXXX@XXXXX.COM >writes:
Quote"Alisdair Meredith" <alisdair.meredith@ XXXX@XXXXX.COM > something else and their secret was never revealed.) -- Chris (TeamB); |
Doug Tinkham
CBuilder Developer |
2005-03-30 12:41:41 AM
Re:The best C++ compiler (not the IDE)
"Alisdair Meredith" <alisdair.meredith@ XXXX@XXXXX.COM >
wrote in message news: XXXX@XXXXX.COM ... Quote
Thanks |
Doug Tinkham
CBuilder Developer |
2005-03-30 03:55:43 AM
Re:The best C++ compiler (not the IDE)
"Chris Uzdavinis (TeamB)" < XXXX@XXXXX.COM >wrote in message
QuoteSorry, I've never used it or talked with anyone who has. (Or, if I think), for whatever that is worth. Doug |
Hendrik Schober
CBuilder Developer |
2005-04-07 06:21:16 PM
Re:The best C++ compiler (not the IDE)
Alisdair Meredith <alisdair.meredith@ XXXX@XXXXX.COM >wrote:
Quote[...] QuoteMetrowerks also implement 2 phase lookup, something MS have said they which, to me, gives CW a big advantage. (I recently have done a lot of stuff on the Mac, where I have CW's two-phase lookup, even though I hate haveing to use the mouse all the time. Finding bugs in template code earlier was worth the hassle.) VC71 accepting a lot of code with missing 'typename' (or 'template') is another big hassle. Whenever I port, these steal a lot of my time. QuoteApparently GCC added 2 phase lookup for v3.4 and is pushing {*word*156} two-phase lookup and missing 'typename' or 'template' in definitions and calls.) However, as we rarely ever write anything new using GCC, but rather only port to it, this doesn't necessarily mean, GCC is better. While it finds errors that the other ones overlook, there might be even more errors it overlooks which the other ones would find -- only we never have a scenario where we would run into those. Quote[...] XXXX@XXXXX.COM is never read I'm Schobi at suespammers dot org "The presence of those seeking the truth is infinitely to be prefered to those thinking they've found it." Terry Pratchett |
Hendrik Schober
CBuilder Developer |
2005-04-07 06:23:05 PM
Re:The best C++ compiler (not the IDE)
Doug Tinkham < XXXX@XXXXX.COM >wrote:
Quote"Alisdair Meredith" <alisdair.meredith@ XXXX@XXXXX.COM > plainly disses some std C++ features as he considers them not useful enough compared to the pain they make implementors. QuoteThanks XXXX@XXXXX.COM is never read I'm Schobi at suespammers dot org "The presence of those seeking the truth is infinitely to be prefered to those thinking they've found it." Terry Pratchett |
Hendrik Schober
CBuilder Developer |
2005-04-07 06:27:42 PM
Re:The best C++ compiler (not the IDE)
Lai Chi Wai < XXXX@XXXXX.COM >wrote:
QuoteDear all, you are mistaken. QuoteCurrently, GCC should perform the best and following VC++ accepted as the most compliant compilers. Comeau + Dinkumware Std Lib is probably the closest you can get to the standard. QuoteBecause of the age of BCB 6, it really behinds the standard (mainly in QuoteFor executable performance, GCC and VC++ 7.1 is head to head in the top. compiler to be among the best on Intel platforms.) Quote[...] XXXX@XXXXX.COM is never read I'm Schobi at suespammers dot org "The presence of those seeking the truth is infinitely to be prefered to those thinking they've found it." Terry Pratchett |