iPhone GCC / LLVM GCC或LLVM? [英] iPhone GCC / LLVM GCC or LLVM?

查看:131
本文介绍了iPhone GCC / LLVM GCC或LLVM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问专家在这里...

Im asking the experts here...

有没有人做了一些性能测试,哪个编译器是最适合iPhone应用程序?

Does anybody have made some performance test about which compiler is the best for iPhone apps?

由于我们可以选择:


  • GCC 4.2

  • LLVM GCC 4.2

  • LLVM编译器1.5

我不知道3中哪一个提供了最佳性能...

Im wondering which of the 3 offers the best performance...

我自己做了一些快速测试,但没有发现太大的区别?

I've done some quick test myself but haven't found much difference?

编译器是否使用?

推荐答案

如果您观看 WWDC 2010会话视频 300,联盟的开发人员工具状态,您会看到,苹果报告显着的性能提升使用LLVM编译器通过GCC在某些情况下更快达60%)。使用Clang解析器和LLVM编译器可以进行其他改进。观看会话312 - LLVM编译器的新增功能了解更多,以及来自WWDC 2009的LLVM会话(如果有的话)。

If you watch the WWDC 2010 session video 300, the Developer Tools State of the Union, you will see that Apple reports significant performance increases for applications built using the LLVM compiler over GCC (up to 60% faster in certain cases). There are additional improvements that can be made by using the Clang parser with the LLVM compiler. Watch Session 312 - "What's New in the LLVM Compiler" for more on this, as well as the sessions on LLVM from WWDC 2009, if you have them.

在我的一个应用程序中的非正式基准中,从GCC到LLVM 1.5的速度提高了20%,但这不是一个严格的测试,因此只考虑一些轶事证据。

I saw a 20% speedup going from GCC to LLVM 1.5 in an informal benchmark within one of my applications, but it wasn't a rigorous test, so consider that only anecdotal evidence.

我的建议是使用Clang + LLVM(LLVM Compiler 1.5),如果你能够更快的构建时间,更高性能的应用程序和更好的编译器错误。如果你使用C ++代码或Clang解析器现在不能处理的其他东西,使用LLVM GCC仍然可以在编译应用程序中获得性能优势。如果由于某种原因失败,请转到GCC。这是一个简单的开关,在您的构建设置中获得甚至一个小量额外的性能,在您的最终应用程序中免费。

My recommendation is to use Clang + LLVM (LLVM Compiler 1.5) if you can for faster build times, more performant applications, and much better compiler errors. If you use C++ code or something else that the Clang parser cannot handle right now, use LLVM GCC to still get the performance benefits in your compiled application. Go to GCC only if that fails for some reason. It's a simple switch to hit in your build settings to gain even a small amount of extra performance for free in your end application.

LLVM编译器2.0,完全支持C ++并承诺对编译应用程序的额外优化,以及更多的编译时加速。 Xcode 4甚至使用Clang作为IDE中的语法高亮/代码校正引擎。很明显苹果正在使用他们的编译器。

LLVM Compiler 2.0, coming with Xcode 4, has full support for C++ and promises additional optimizations for compiled applications, along with more compile-time speedups. Xcode 4 even uses Clang as the syntax highlighting / code correction engine in the IDE. It's clear the direction that Apple is heading with their compilers.

这篇关于iPhone GCC / LLVM GCC或LLVM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆