哪个免费 C 编译器提供了更好的优化选项?
您能给我一些 C 编译器之间的比较,特别是在优化方面吗?
Can you please give me some comparison between C compilers especially with respect to optimization?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
实际上,免费的编译器并不多。 gcc 是“最好的”免费编译器,即使与专有编译器相比,在优化方面也可能是最好的编译器之一。
一些独立的基准可以从这里链接:
http://gcc.gnu.org/benchmarks/
Actually there aren't many free compilers around. gcc is "the" free compiler and probably one of the best when it comes to optimisation, even when compared to proprietary compilers.
Some independent benchmarks are linked from here:
http://gcc.gnu.org/benchmarks/
我相信Intel允许你在Linux下免费使用它的ICC编译器进行非商业开发。在 x86 和 x86-64 的代码生成方面,ICC 轻而易举地击败了 gcc 和 Visual Studio(即它通常生成更快的代码,并且在某些情况下可以很好地完成自动矢量化 (SIMD) 工作)。
I believe Intel allows you to use its ICC compilers under Linux for non-commercial development for free. ICC beats gcc and Visual Studio hands down when it comes to code generation for x86 and x86-64 (i.e. it typically generates faster code, and can do a decent job of auto-vectorization (SIMD) in some cases).
这是一个很难回答的问题,因为您没有告诉我们您正在使用什么平台,既没有硬件也没有操作系统……
但是 joemoe 是对的,gcc 往往在这个领域表现出色。
(附带说明:在某些平台上,有更好的商业编译器,但由于您获得的东西太多,因此编译器 gcc 很难被击败......)
This is a hard question to answer since you did not tell us what platform you are using, neither hardware or os....
But joemoe is right, gcc tend to excel in this field.
(As a side note: On some platforms there are commercial compilers that are better, but since you gain so much more that just the compiler gcc is hard to beat...)
Windows SDK 可以免费下载。它包括当前版本的 Visual C++ 编译器。这些编译器在优化方面做得非常好。
the Windows SDK is a free download. it includes current versions of the Visual C++ compilers. These compilers do a very good job of optimisation.