2 ms·
> From a PL / compiler standpoint it's pretty obvious that Swift is not going to match Objective C from a performance standpoint. This shows a deep misundersta
by nardi 12y ago
> From a PL / compiler standpoint it's pretty obvious that Swift is not going to match Objective C from a performance standpoint.
This shows a deep misunderstanding of Objective-C and Swift. Swift has way more type information at compile time than Objective-C, and thus gives the compiler much more room to optimize (in addition to being safer). My guess is we'll see Swift eventually be faster than Objective-C at just about everything. For instance, they could unbox class instances into values where possible, which is something they're probably not doing much of yet.
- mpweiher 12y agoThis applies to naive code, where you let the compiler fix it. In those cases, Swift can be better because of the reasons you mention. However, if you actually put your mind to it, for the 1-5% of code that actually matter, performance-wise, it is hard to beat the performance, and more importantly: predictability, of C.