Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift vs Objective-C: App performance [closed]

I am doing some research on Swift and its differences with Objective-C. From what I could gather, the current version of Swift is quite fast, faster even than Objective-C: see here.

However, since most of these tests are done with sorting algorithms and such, I am wondering if Swift will actually be faster than Objective-C when it is used for development of iOS apps. Can anyone enlighten me on this, preferably from their own experience.

like image 514
Black Magic Avatar asked Feb 11 '15 11:02

Black Magic


People also ask

Is Swift faster than Objective-C?

Apple's official website claims that Swift is up to 2.6 times faster than Objective-C. They named the language “Swift” for a reason. Swift's simpler syntax and compile-time type checking help increase its performance. But the most significant boost in performance comes from its memory management and scalability.

When it comes to performance Objective-C is 2.6 faster than Swift?

Performance You may have heard that Swift is 2.6 times faster than Objective-C. Swift can outperform Objective-C due to simpler syntax and performing type checking at compile-time. Moreover, Swift supports dynamic libraries, which also help to grow application performance.

Which is the better option for iOS app Swift or Objective-C Why?

According to Apple, Swift is approximately 2.6 times faster than Objective C. The speed calculated generally relates to the speed of coding. Swift's syntax is much more simple and direct than Objective-C. This enables developers to focus on the core part of the code rather than the rules on which the codes are based.

What is advantage of Objective-C over Swift?

With Objective-C, there are many issues that cause app crashes. Swift provides code that is less error-prone because of its inline support for manipulating text strings and data. Additionally, classes aren't divided into two parts; the interface and the implementation.


1 Answers

Swift is claimed by Apple to be faster than Objective-C, and as you said it is faster in those sorting algorithms, but for the usage of iOS development, a simple user would not recognize the difference between an app developed in Swift or Objective-C. I developed a lot of apps in Objective-C that are in apple store, and now several in Swift and so far users can not tell the difference if one is much faster than the other.

Swift is unlikely to result in applications that run much faster than applications developed in Objective-C. Even though the two languages are quit different, both target the same Cocoa and Cocoa Touch APIs, iOS and OS X a, both are statically typed languages and both use the same LLVM compiler, so they are not that different after all. There will be performance differences, as the two languages aren't identical after all, but don't expect significant differences.

Swift is also developed from Apple to appeal to new programmers because it is similar to languages such as Ruby and Python than it is Objective-C.

like image 100
trimi Avatar answered Sep 19 '22 22:09

trimi