Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is comeau compiler worth it compared to gcc?

I have been using gcc, g++ for my C, C++ application development till now and have found it to be amazing. But browsing through Stack Overflow I found many members stating that error reporting in Comeau compiler is much more than any other compiler. Is this true? I haven't invested in any commercial release of a compiler. Is it really worth spending money on a commercial release of a C/C++ compiler when gcc, g++ are doing the trick?

like image 574
rocknroll Avatar asked Jul 17 '09 05:07

rocknroll


1 Answers

My experience with writing C++ is that compiling your code with more than one compiler is a great way to find odd corner-cases in your code. In our case, we've used gcc, Apple gcc, and the Visual Studio compiler cl (which is free). When on Windows, I prefer the cl compiler since it compiles faster (around five times faster for us) and it produces better code (around 30% faster last time I checked). Which compiler produces the fastest code is always dependent on the application though. In our particular case the Intel compiler is not so good at producing fast code contrary to popular opinion, so there is no real incentive to use it.

If we had the money to spend, compiling with Comeau would be nice to help with additional checking for standards conformance. Apart from that, I'm happy with the compilers we use.

like image 115
Zayenz Avatar answered Sep 28 '22 10:09

Zayenz